Clippy
This commit is contained in:
parent
c6cee44421
commit
59f6a2e26c
1 changed files with 3 additions and 3 deletions
|
@ -161,8 +161,8 @@ async fn parse_message(event: SyncMessageEvent<MessageEventContent>, 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?;
|
||||
|
|
Loading…
Reference in a new issue