From b300add154af665a7f72dd9fc29d89ec52f9f323 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 11 Jul 2024 06:32:13 +0200 Subject: [PATCH] Lint: use char instead of str for single characters --- src/telegram/commands/help.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/telegram/commands/help.rs b/src/telegram/commands/help.rs index a70bcdb0..226317ba 100644 --- a/src/telegram/commands/help.rs +++ b/src/telegram/commands/help.rs @@ -31,7 +31,7 @@ pub async fn handler_specific(bot: &Bot, message: &Message, target: &str) -> Com let suffix = format!("@{me_username}"); - let target = target.strip_prefix("/") + let target = target.strip_prefix('/') .unwrap_or(target); let target = target.strip_suffix(&suffix) @@ -46,7 +46,7 @@ pub async fn handler_specific(bot: &Bot, message: &Message, target: &str) -> Com let identify_command = |cmd: &&BotCommand| -> bool { let command = &cmd.command; - let command = command.strip_prefix("/") + let command = command.strip_prefix('/') .unwrap_or_else(|| command); target == command