Readability fixes for cargo clippy

This commit is contained in:
NG (Graham) committed 2025-09-03 22:33:32 -04:00
1 parent 9dcb12131b
commit 0e35aced01
77 files changed
+725 -735

No files matched your search

+3 -7
View File
@@ -36,7 +36,7 @@ impl ChatSystemConfig {
return result;
}
}
return "Invalid command".to_owned()
"Invalid command".to_owned()
}
pub fn is_command_channel(&self, channel: &str) -> bool {
@@ -66,11 +66,7 @@ impl ChatCommand {
}
fn perform_if_match(&self, text: &str, ctx: CommandContext) -> Option<String> {
if let Some(cap) = self.regex.captures(text) {
Some(self.op.perform_command(cap, ctx))
} else {
None
}
self.regex.captures(text).map(|cap| self.op.perform_command(cap, ctx))
}
}
@@ -122,7 +118,7 @@ impl BuiltIn {
}
},
Self::TotalUsers => {
format!("User count is not supported")
"User count is not supported".to_string()
},
}
}
+1
View File
@@ -1,3 +1,4 @@
#[allow(clippy::module_inception)]
mod chat;
pub use chat::{ChatSystem, ChatProvider};