Remove iflet by using Option::{map_err, and}()
This commit is contained in:
parent
3fb6d507e5
commit
a852da54dd
1 changed files with 3 additions and 6 deletions
|
@ -341,12 +341,9 @@ impl Store {
|
|||
})
|
||||
.map(|e| FileLockEntry::new(self, e, id))
|
||||
.and_then(|mut fle| {
|
||||
if let Err(e) = self.execute_hooks_for_mut_file(self.post_retrieve_aspects.clone(), &mut fle) {
|
||||
Err(StoreError::new(StoreErrorKind::HookExecutionError, Some(Box::new(e))))
|
||||
} else {
|
||||
Ok(fle)
|
||||
}
|
||||
|
||||
self.execute_hooks_for_mut_file(self.pre_retrieve_aspects.clone(), &mut fle)
|
||||
.map_err(|e| StoreError::new(StoreErrorKind::HookExecutionError, Some(Box::new(e))))
|
||||
.and(Ok(fle))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue