mirror of https://github.com/MedzikUser/servers
fix(clippy): change `< 1` to .is_empty()
Replaced `args.len() < 1` with `args.is_empty()`.
This commit is contained in:
parent
db6e068926
commit
501cbc74b7
|
@ -23,7 +23,7 @@ impl Command for Broadcast {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn execute(&self, client: &Client, args: Vec<&str>) -> anyhow::Result<()> {
|
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")?;
|
client.send("Missing message")?;
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue