diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:30:21 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:30:21 -0400 |
| commit | fb088b4ff56ed76dabf4e638cb92bc1b9275fbcc (patch) | |
| tree | 53cb51db079edafd756cae6a3d5fc4fae829429c /src/commands/meme/history.rs | |
| parent | 47817c4166937af24041a93e56ad9f841bf1e8f1 (diff) | |
clippy fixes
Diffstat (limited to 'src/commands/meme/history.rs')
| -rw-r--r-- | src/commands/meme/history.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
