aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/src/main.rs4
1 files changed, 2 insertions, 2 deletions
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<Vec<String>> {
56 let mut args = Vec::<String>::new(); 56 let mut args = Vec::<String>::new();
57 57
58 cmd = cmd.trim_matches(is_posix_space); 58 cmd = cmd.trim_matches(is_posix_space);
59 while cmd != "" { 59 while !cmd.is_empty() {
60 if cmd.starts_with('\'') { 60 if cmd.starts_with('\'') {
61 let (arg, remaining) = parse_sq(cmd)?; 61 let (arg, remaining) = parse_sq(cmd)?;
62 args.push(arg); 62 args.push(arg);
@@ -91,7 +91,7 @@ fn main() -> ExitCode {
91 eprintln!("Missing argument for argument '-c'"); 91 eprintln!("Missing argument for argument '-c'");
92 return bad_usage; 92 return bad_usage;
93 }; 93 };
94 if args.next() != None { 94 if args.next().is_some() {
95 eprintln!("Too many arguments passed"); 95 eprintln!("Too many arguments passed");
96 return bad_usage; 96 return bad_usage;
97 } 97 }