Replace unwrap() with match
This commit is contained in:
parent
0f13fc38c0
commit
13945ab352
1 changed files with 4 additions and 5 deletions
|
@ -10,11 +10,10 @@ pub fn get(rt: &Runtime) {
|
||||||
.map(|scmd| {
|
.map(|scmd| {
|
||||||
scmd.value_of("id")
|
scmd.value_of("id")
|
||||||
.map(|id| {
|
.map(|id| {
|
||||||
let path = build_entry_path(rt.store(), id);
|
let path = match build_entry_path(rt.store(), id) {
|
||||||
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);
|
||||||
|
|
||||||
match rt.store().get(path) {
|
match rt.store().get(path) {
|
||||||
|
|
Loading…
Reference in a new issue