From 38b9e15615db0b5fb285f0cd07b3877f914cd8f5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 1 Mar 2016 21:19:15 +0100 Subject: [PATCH] Remove unreachable statement --- libimagstore/src/store.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 1cc0d94d..31af2c80 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -617,12 +617,11 @@ impl EntryHeader { let value = EntryHeader::walk_header(&mut header_clone, tokens); // walk N-1 tokens if value.is_err() { let e = value.err().unwrap(); - match e.err_type() { + return match e.err_type() { // We cannot find the header key, as there is no path to it - StoreErrorKind::HeaderKeyNotFound => return Ok(None), - _ => return Err(e), - } - return Err(e); + StoreErrorKind::HeaderKeyNotFound => Ok(None), + _ => Err(e), + }; } Ok(Some(value.unwrap().clone())) }