mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-21 18:44:19 +00:00
Lint: use char instead of str for single characters
This commit is contained in:
parent
60c67d792b
commit
b300add154
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue