aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
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),
}
}