diff options
| author | seth <[email protected]> | 2023-12-15 03:17:20 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-15 16:41:13 -0500 |
| commit | 8d22f09089b13d013cf94526c205f374bdf873c3 (patch) | |
| tree | 505c864e5683e6ece7d2ead2f9e019b8cc797548 /src/commands/optional | |
| parent | ebdcc85dc7c80796446535fa2799bb62f2c12aac (diff) | |
enable clippy::all, clippy::pedantic, & clippy::perf
Diffstat (limited to 'src/commands/optional')
| -rw-r--r-- | src/commands/optional/copypasta.rs | 8 | ||||
| -rw-r--r-- | src/commands/optional/teawiespam.rs | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/commands/optional/copypasta.rs b/src/commands/optional/copypasta.rs index 54b6194..6ed4f95 100644 --- a/src/commands/optional/copypasta.rs +++ b/src/commands/optional/copypasta.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use color_eyre::eyre::{eyre, Result}; use include_dir::{include_dir, Dir}; -use log::*; +use log::debug; const FILES: Dir = include_dir!("src/copypastas"); @@ -34,7 +34,7 @@ impl Copypastas { } } -fn get_copypasta(name: Copypastas) -> Result<String> { +fn get_copypasta(name: &Copypastas) -> Result<String> { let mut files: HashMap<&str, &str> = HashMap::new(); for file in FILES.files() { @@ -66,8 +66,6 @@ pub async fn copypasta( ctx: Context<'_>, #[description = "the copypasta you want to send"] copypasta: Copypastas, ) -> Result<()> { - debug!("Running copypasta command with copypasta {copypasta}"); - let gid = ctx.guild_id().unwrap_or_default(); let settings = ctx.data().storage.get_guild_settings(&gid).await?; @@ -76,7 +74,7 @@ pub async fn copypasta( return Ok(()); } - ctx.say(get_copypasta(copypasta)?).await?; + ctx.say(get_copypasta(©pasta)?).await?; Ok(()) } diff --git a/src/commands/optional/teawiespam.rs b/src/commands/optional/teawiespam.rs index a876d09..fd635ff 100644 --- a/src/commands/optional/teawiespam.rs +++ b/src/commands/optional/teawiespam.rs @@ -1,7 +1,7 @@ use crate::Context; use color_eyre::eyre::Result; -use log::*; +use log::debug; /// teawie will spam you. #[poise::command(slash_command, prefix_command)] |
