From 59f6a2e26c192d058eb7cf15a5f73dd88b8c1f1a Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Thu, 5 May 2022 22:07:55 -0700 Subject: [PATCH] Clippy --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 608057d..5c30491 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,8 +161,8 @@ async fn parse_message(event: SyncMessageEvent, room: Joine _ => return Ok(()), }; - if let Some(message) = message.strip_prefix("!") { - let (command, args) = message.split_once(" ").unwrap_or((message, "")); + if let Some(message) = message.strip_prefix('!') { + let (command, args) = message.split_once(' ').unwrap_or((message, "")); match command { "source" => source(room).await?, "uwu" => uwuify(room, args).await?, @@ -190,7 +190,7 @@ async fn unsupported_command( room: Joined, command: &str, ) -> Result<()> { - let resp = original_event.into_full_event(room.room_id().to_owned()); + let resp = original_event.into_full_event(room.room_id().clone()); let content = MessageEventContent::notice_reply_plain(format!("Unknown command `{command}`"), &resp); room.send(content, None).await?;