some cahnges

This commit is contained in:
RustemB 2019-10-20 16:05:20 +05:00
parent 0a1d032e14
commit e80d4d5a62
2 changed files with 8 additions and 8 deletions

View file

@ -42,21 +42,21 @@ impl GetChat<'_> {
} }
impl<'a> GetChat<'a> { 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 where
F: Into<ChatId>, F: Into<ChatId>,
{ {
Self { Self {
bot, 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 where
C: Into<ChatId>, C: Into<ChatId>,
{ {
self.chat_id = value.into(); self.chat_id = chat_id.into();
self self
} }
} }

View file

@ -40,20 +40,20 @@ impl LeaveChat<'_> {
} }
impl<'a> LeaveChat<'a> { 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 where
F: Into<ChatId>, F: Into<ChatId>,
{ {
Self { Self {
bot, 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 where
C: Into<ChatId>, C: Into<ChatId>,
{ {
self.chat_id = value.into(); self.chat_id = chat_id.into();
self self
} }
} }