Rewrite .map_err_trace_exit_unwrap()
Necessary because error types changed
This commit is contained in:
parent
50b0ffa6ae
commit
c0000b6410
2 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
|
|||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
regex = "0.2"
|
||||
|
||||
libimagstore = { version = "0.7.0", path = "../../../lib/core/libimagstore" }
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
while_true,
|
||||
)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
extern crate clap;
|
||||
extern crate regex;
|
||||
|
||||
|
@ -70,7 +71,10 @@ fn main() {
|
|||
.value_of("pattern")
|
||||
.map(Regex::new)
|
||||
.unwrap() // ensured by clap
|
||||
.map_err_trace_exit_unwrap(1);
|
||||
.unwrap_or_else(|e| {
|
||||
error!("Regex building error: {:?}", e);
|
||||
::std::process::exit(1)
|
||||
});
|
||||
|
||||
let overall_count = rt
|
||||
.store()
|
||||
|
|
Loading…
Reference in a new issue