From 734112b8569d383e88b86afa6e6395fe16c26d0b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 9 Mar 2019 12:24:20 +0100 Subject: [PATCH] Simplify Signed-off-by: Matthias Beyer --- lib/entry/libimagentrycategory/src/iter.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/entry/libimagentrycategory/src/iter.rs b/lib/entry/libimagentrycategory/src/iter.rs index a9df295d..f1138fd5 100644 --- a/lib/entry/libimagentrycategory/src/iter.rs +++ b/lib/entry/libimagentrycategory/src/iter.rs @@ -73,7 +73,8 @@ impl<'a> Iterator for CategoryNameIter<'a> { .read_string(query) .map_err(Error::from) .context(EM::EntryHeaderReadError)? - .ok_or_else(|| Error::from(err_msg("Store read error"))) + .ok_or_else(|| err_msg("Store read error")) + .map_err(Error::from) }; return Some(func(&self.0))