Replace unwrap() with match
This commit is contained in:
parent
84e33c07e6
commit
0f13fc38c0
1 changed files with 4 additions and 5 deletions
|
@ -36,11 +36,10 @@ pub fn create(rt: &Runtime) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = build_entry_path(rt.store(), path.unwrap());
|
let path = match build_entry_path(rt.store(), path.unwrap()) {
|
||||||
if path.is_err() {
|
Err(e) => trace_error_exit(&e, 1),
|
||||||
trace_error_exit(&path.unwrap_err(), 1);
|
Ok(p) => p,
|
||||||
}
|
};
|
||||||
let path = path.unwrap();
|
|
||||||
debug!("path = {:?}", path);
|
debug!("path = {:?}", path);
|
||||||
|
|
||||||
if scmd.subcommand_matches("entry").is_some() {
|
if scmd.subcommand_matches("entry").is_some() {
|
||||||
|
|
Loading…
Reference in a new issue