From fb088b4ff56ed76dabf4e638cb92bc1b9275fbcc Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 8 May 2024 14:30:21 -0400 Subject: clippy fixes --- src/commands/meme/history.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/meme/history.rs') diff --git a/src/commands/meme/history.rs b/src/commands/meme/history.rs index 33a2de2..e2953d1 100644 --- a/src/commands/meme/history.rs +++ b/src/commands/meme/history.rs @@ -128,7 +128,7 @@ pub async fn history(ctx: &Context, msg: &Message, mut args: Args) -> CommandRes InvocationRecord::last_n(&mut conn, n)? }; - if records.len() == 0 { + if records.is_empty() { info!("no memes in history"); return util::send(ctx, msg.channel_id, "i don't remember anything :(", msg.tts) .map_err(CommandError::from) @@ -393,7 +393,7 @@ pub async fn query(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul }) .join("\n"); - if result.len() == 0 { + if result.is_empty() { info!("no memes matched query"); return util::send(ctx, msg.channel_id, "no match".to_owned(), msg.tts) -- cgit v1.3.1