From 501cbc74b703c27759f0a476dddf45043f7b9e23 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Sat, 20 Aug 2022 15:01:48 +0200 Subject: [PATCH] fix(clippy): change `< 1` to .is_empty() Replaced `args.len() < 1` with `args.is_empty()`. --- src/commands/broadcast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/broadcast.rs b/src/commands/broadcast.rs index 8d26514..66ae26a 100644 --- a/src/commands/broadcast.rs +++ b/src/commands/broadcast.rs @@ -23,7 +23,7 @@ impl Command for Broadcast { } async fn execute(&self, client: &Client, args: Vec<&str>) -> anyhow::Result<()> { - if args.len() < 1 || args.join(" ").is_empty() { + if args.is_empty() || args.join(" ").is_empty() { client.send("Missing message")?; return Ok(()); }