aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-24 23:37:50 +0100
committerLibravatar Rutger Broekhoff2024-01-24 23:37:50 +0100
commit0451973538c92d260cf887392ebdf6b16b8ec772 (patch)
tree24a657faade0872753a384fe419b36c6eca31249 /shell
parentd3f53661d5366306a1cf9ef66fbf02a754cc5c3d (diff)
downloadgitolfs3-0451973538c92d260cf887392ebdf6b16b8ec772.tar.gz
gitolfs3-0451973538c92d260cf887392ebdf6b16b8ec772.zip
Add flake checks
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 }