From 60c67d792bd91060cd277cef6cbe7f3b6dcada56 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 11 Jul 2024 06:31:53 +0200 Subject: [PATCH] Lint: make lazy moves into eager moves instead --- 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 763200c8..a70bcdb0 100644 --- a/src/telegram/commands/help.rs +++ b/src/telegram/commands/help.rs @@ -32,10 +32,10 @@ pub async fn handler_specific(bot: &Bot, message: &Message, target: &str) -> Com let suffix = format!("@{me_username}"); let target = target.strip_prefix("/") - .unwrap_or_else(|| target); + .unwrap_or(target); let target = target.strip_suffix(&suffix) - .unwrap_or_else(|| target); + .unwrap_or(target); log::trace!("Stripped target command: {target:?}");