Replace unwrap() with match

This commit is contained in:
Matthias Beyer 2016-08-03 11:36:40 +02:00
parent 0f13fc38c0
commit 13945ab352

View file

@ -10,11 +10,10 @@ pub fn get(rt: &Runtime) {
.map(|scmd| {
scmd.value_of("id")
.map(|id| {
let path = build_entry_path(rt.store(), id);
if path.is_err() {
trace_error_exit(&path.unwrap_err(), 1);
}
let path = path.unwrap();
let path = match build_entry_path(rt.store(), id) {
Err(e) => trace_error_exit(&e, 1),
Ok(p) => p,
};
debug!("path = {:?}", path);
match rt.store().get(path) {