Remove useless .ok()
This commit is contained in:
parent
fdfb126c9c
commit
334a5fe076
1 changed files with 5 additions and 5 deletions
10
src/main.rs
10
src/main.rs
|
@ -190,11 +190,11 @@ async fn parse_message(event: SyncRoomMessageEvent, room: Joined) -> Result<()>
|
||||||
|
|
||||||
if let Some(message) = message.strip_prefix('!') {
|
if let Some(message) = message.strip_prefix('!') {
|
||||||
let (command, args) = message.split_once(' ').unwrap_or((message, ""));
|
let (command, args) = message.split_once(' ').unwrap_or((message, ""));
|
||||||
match BotCommand::from_str(command).ok() {
|
match BotCommand::from_str(command) {
|
||||||
Some(BotCommand::Source) => source(room).await?,
|
Ok(BotCommand::Source) => source(room).await?,
|
||||||
Some(BotCommand::Uwu) => uwuify(room, args).await?,
|
Ok(BotCommand::Uwu) => uwuify(room, args).await?,
|
||||||
Some(BotCommand::Ping) => ping(room).await?,
|
Ok(BotCommand::Ping) => ping(room).await?,
|
||||||
Some(BotCommand::Help) => help(room).await?,
|
Ok(BotCommand::Help) => help(room).await?,
|
||||||
_ => unsupported_command(event, room, command).await?,
|
_ => unsupported_command(event, room, command).await?,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue