mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Fix some Clippy's lints
This commit is contained in:
parent
eee360792a
commit
2fe88cbfe3
2 changed files with 3 additions and 3 deletions
|
@ -146,7 +146,7 @@ pub fn polling<'a>(bot: &'a Bot) -> impl Updater<Error = RequestError> + 'a {
|
|||
if let Some(upd) = updates.last() {
|
||||
offset = upd.id + 1;
|
||||
}
|
||||
updates.into_iter().map(|u| Ok(u)).collect::<Vec<_>>()
|
||||
updates.into_iter().map(Ok).collect::<Vec<_>>()
|
||||
}
|
||||
Err(err) => vec![Err(err)],
|
||||
};
|
||||
|
|
|
@ -110,7 +110,7 @@ impl IntoFormValue for ChatId {
|
|||
fn into_form_value(self) -> Option<FormValue> {
|
||||
let string = match self {
|
||||
ChatId::Id(id) => id.to_string(),
|
||||
ChatId::ChannelUsername(username) => username.clone(),
|
||||
ChatId::ChannelUsername(username) => username,
|
||||
};
|
||||
Some(FormValue::Str(string))
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ impl IntoFormValue for ChatId {
|
|||
|
||||
impl IntoFormValue for String {
|
||||
fn into_form_value(self) -> Option<FormValue> {
|
||||
Some(FormValue::Str(self.to_owned()))
|
||||
Some(FormValue::Str(self))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue