Minify error handling in Store::update()

This commit is contained in:
Matthias Beyer 2016-09-18 14:52:00 +02:00
parent 9b332815b9
commit b288e938f9

View file

@ -493,10 +493,7 @@ impl Store {
/// Return the `FileLockEntry` and write to disk /// Return the `FileLockEntry` and write to disk
pub fn update<'a>(&'a self, mut entry: FileLockEntry<'a>) -> Result<()> { pub fn update<'a>(&'a self, mut entry: FileLockEntry<'a>) -> Result<()> {
if let Err(e) = self._update(&mut entry) { self._update(&mut entry).map_err_into(SEK::UpdateCallError)
return Err(e).map_err_into(SEK::UpdateCallError);
}
Ok(())
} }
/// Internal method to write to the filesystem store. /// Internal method to write to the filesystem store.