mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
some cahnges
This commit is contained in:
parent
0a1d032e14
commit
e80d4d5a62
2 changed files with 8 additions and 8 deletions
|
@ -42,21 +42,21 @@ impl GetChat<'_> {
|
|||
}
|
||||
|
||||
impl<'a> GetChat<'a> {
|
||||
pub(crate) fn new<F>(bot: &'a Bot, value: F) -> Self
|
||||
pub(crate) fn new<F>(bot: &'a Bot, chat_id: F) -> Self
|
||||
where
|
||||
F: Into<ChatId>,
|
||||
{
|
||||
Self {
|
||||
bot,
|
||||
chat_id: value.into(),
|
||||
chat_id: chat_id.into(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn chat_id<C>(mut self, value: C) -> Self
|
||||
pub fn chat_id<C>(mut self, chat_id: C) -> Self
|
||||
where
|
||||
C: Into<ChatId>,
|
||||
{
|
||||
self.chat_id = value.into();
|
||||
self.chat_id = chat_id.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,20 +40,20 @@ impl LeaveChat<'_> {
|
|||
}
|
||||
|
||||
impl<'a> LeaveChat<'a> {
|
||||
pub(crate) fn new<F>(bot: &'a Bot, value: F) -> Self
|
||||
pub(crate) fn new<F>(bot: &'a Bot, chat_id: F) -> Self
|
||||
where
|
||||
F: Into<ChatId>,
|
||||
{
|
||||
Self {
|
||||
bot,
|
||||
chat_id: value.into(),
|
||||
chat_id: chat_id.into(),
|
||||
}
|
||||
}
|
||||
pub fn chat_id<C>(mut self, value: C) -> Self
|
||||
pub fn chat_id<C>(mut self, chat_id: C) -> Self
|
||||
where
|
||||
C: Into<ChatId>,
|
||||
{
|
||||
self.chat_id = value.into();
|
||||
self.chat_id = chat_id.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue