Use "if let" if matching on a single pattern
This commit is contained in:
parent
f1142c414d
commit
bf363c4748
1 changed files with 3 additions and 6 deletions
|
@ -793,12 +793,9 @@ impl<'a> Drop for FileLockEntry<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
use libimagerror::trace::trace_error_dbg;
|
use libimagerror::trace::trace_error_dbg;
|
||||||
trace!("Dropping: {:?} - from FileLockEntry::drop()", self.get_location());
|
trace!("Dropping: {:?} - from FileLockEntry::drop()", self.get_location());
|
||||||
match self.store._update(self, true) {
|
if let Err(e) = self.store._update(self, true) {
|
||||||
Err(e) => {
|
|
||||||
trace_error_dbg(&e);
|
trace_error_dbg(&e);
|
||||||
if_cfg_panic!("ERROR WHILE DROPPING: {:?}", e);
|
if_cfg_panic!("ERROR WHILE DROPPING: {:?}", e);
|
||||||
},
|
|
||||||
Ok(_) => { },
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue