1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-25 12:34:19 +00:00

Lint: use char instead of str for single characters

This commit is contained in:
Steffo 2024-07-11 06:32:13 +02:00
parent 60c67d792b
commit b300add154
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -31,7 +31,7 @@ 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(target); .unwrap_or(target);
let target = target.strip_suffix(&suffix) 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 identify_command = |cmd: &&BotCommand| -> bool {
let command = &cmd.command; let command = &cmd.command;
let command = command.strip_prefix("/") let command = command.strip_prefix('/')
.unwrap_or_else(|| command); .unwrap_or_else(|| command);
target == command target == command