From 0451973538c92d260cf887392ebdf6b16b8ec772 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Wed, 24 Jan 2024 23:37:50 +0100 Subject: Add flake checks --- shell/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/src/main.rs b/shell/src/main.rs index ef0ef48..4901e7f 100644 --- a/shell/src/main.rs +++ b/shell/src/main.rs @@ -56,7 +56,7 @@ fn parse_cmd(mut cmd: &str) -> Option> { let mut args = Vec::::new(); cmd = cmd.trim_matches(is_posix_space); - while cmd != "" { + while !cmd.is_empty() { if cmd.starts_with('\'') { let (arg, remaining) = parse_sq(cmd)?; args.push(arg); @@ -91,7 +91,7 @@ fn main() -> ExitCode { eprintln!("Missing argument for argument '-c'"); return bad_usage; }; - if args.next() != None { + if args.next().is_some() { eprintln!("Too many arguments passed"); return bad_usage; } -- cgit v1.2.3