Use "if let" if matching on a single pattern

This commit is contained in:
Matthias Beyer 2018-04-24 21:24:56 +02:00
parent f1142c414d
commit bf363c4748

View file

@ -793,12 +793,9 @@ impl<'a> Drop for FileLockEntry<'a> {
fn drop(&mut self) {
use libimagerror::trace::trace_error_dbg;
trace!("Dropping: {:?} - from FileLockEntry::drop()", self.get_location());
match self.store._update(self, true) {
Err(e) => {
if let Err(e) = self.store._update(self, true) {
trace_error_dbg(&e);
if_cfg_panic!("ERROR WHILE DROPPING: {:?}", e);
},
Ok(_) => { },
}
}
}