diff options
author | Daniel <kingdread@gmx.de> | 2021-11-12 14:08:35 +0100 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2021-11-12 14:08:35 +0100 |
commit | 2e2bdac00092f8fcb96283da697a7a820a8c8978 (patch) | |
tree | 6a49f4f852c39a261d7210a002d6f39dc377a581 /src/main.rs | |
parent | 14d90bcbe6cef70d0ab99cb3285038fbd6385efa (diff) | |
download | raidgrep-2e2bdac00092f8fcb96283da697a7a820a8c8978.tar.gz raidgrep-2e2bdac00092f8fcb96283da697a7a820a8c8978.tar.bz2 raidgrep-2e2bdac00092f8fcb96283da697a7a820a8c8978.zip |
Minor code smell fixes
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 256de97..27ad285 100644 --- a/src/main.rs +++ b/src/main.rs @@ -155,11 +155,11 @@ impl Opt { return Ok(filter); } } - return Ok(maybe_filter?); + return maybe_filter; } let expr_string = fexpr::requote(&self.expression); - Ok(build_filter(&expr_string)?) + build_filter(&expr_string) } } @@ -369,7 +369,7 @@ fn single(opt: &Opt) -> Result<bool> { .unwrap_or(false); search_file(path, is_zip, &*filter).map(|r| r.is_some()) } else { - grep(&opt, &*filter) + grep(opt, &*filter) } } @@ -393,7 +393,7 @@ fn repl(opt: &Opt) -> Result<()> { let parsed = build_filter(&line); INTERRUPTED.store(false, Ordering::Relaxed); match parsed { - Ok(filter) => grep(&opt, &*filter).map(|_| ())?, + Ok(filter) => grep(opt, &*filter).map(|_| ())?, Err(err) => display_error(&err), } } |