1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-22 02:54:21 +00:00

Lint: make lazy moves into eager moves instead

This commit is contained in:
Steffo 2024-07-11 06:31:53 +02:00
parent 341ef980d1
commit 60c67d792b
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -32,10 +32,10 @@ pub async fn handler_specific(bot: &Bot, message: &Message, target: &str) -> Com
let suffix = format!("@{me_username}"); let suffix = format!("@{me_username}");
let target = target.strip_prefix("/") let target = target.strip_prefix("/")
.unwrap_or_else(|| target); .unwrap_or(target);
let target = target.strip_suffix(&suffix) let target = target.strip_suffix(&suffix)
.unwrap_or_else(|| target); .unwrap_or(target);
log::trace!("Stripped target command: {target:?}"); log::trace!("Stripped target command: {target:?}");