diff --git a/Cargo.toml b/Cargo.toml index 6a4b28b1..5900ee5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,4 +18,4 @@ heck = "0.4.0" [dev-dependencies] # XXX: Do not enable `macros` feature -teloxide = { git = "https://github.com/teloxide/teloxide.git", rev = "4246455" } +teloxide = { git = "https://github.com/teloxide/teloxide.git", rev = "b5e237a8a22f9f987b6e4245b9b6c3ca1f804c19" } diff --git a/src/bot_commands.rs b/src/bot_commands.rs index 89ee82ce..7d7337e6 100644 --- a/src/bot_commands.rs +++ b/src/bot_commands.rs @@ -102,10 +102,7 @@ fn impl_parse( let matching_values = infos.iter().map(|c| c.get_prefixed_command()); quote! { - fn parse(s: &str, bot_name: N) -> Result - where - N: Into - { + fn parse(s: &str, bot_name: &str) -> Result { // FIXME: we should probably just call a helper function from `teloxide`, instead of parsing command syntax ourselves use std::str::FromStr; use teloxide::utils::command::ParseError; @@ -121,7 +118,7 @@ fn impl_parse( let bot_username = full_command.next(); match bot_username { None => {} - Some(username) if username.eq_ignore_ascii_case(&bot_name.into()) => {} + Some(username) if username.eq_ignore_ascii_case(bot_name) => {} Some(n) => return Err(ParseError::WrongBotName(n.to_owned())), }