From 8d22f09089b13d013cf94526c205f374bdf873c3 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 15 Dec 2023 03:17:20 -0500 Subject: enable clippy::all, clippy::pedantic, & clippy::perf --- src/commands/optional/copypasta.rs | 8 +++----- src/commands/optional/teawiespam.rs | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/commands/optional') 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 { +fn get_copypasta(name: &Copypastas) -> Result { 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)] -- cgit v1.2.3