mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-21 18:44:19 +00:00
Lint: make lazy moves into eager moves instead
This commit is contained in:
parent
341ef980d1
commit
60c67d792b
1 changed files with 2 additions and 2 deletions
|
@ -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:?}");
|
||||
|
||||
|
|
Loading…
Reference in a new issue