From b288e938f9cc256acdd76aaab78fe04b08451c93 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 18 Sep 2016 14:52:00 +0200 Subject: [PATCH] Minify error handling in Store::update() --- libimagstore/src/store.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 5922b35f..bdda753e 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -493,10 +493,7 @@ impl Store { /// Return the `FileLockEntry` and write to disk pub fn update<'a>(&'a self, mut entry: FileLockEntry<'a>) -> Result<()> { - if let Err(e) = self._update(&mut entry) { - return Err(e).map_err_into(SEK::UpdateCallError); - } - Ok(()) + self._update(&mut entry).map_err_into(SEK::UpdateCallError) } /// Internal method to write to the filesystem store.