diff --git a/libimagcounter/src/counter.rs b/libimagcounter/src/counter.rs index bea7537e..c245e261 100644 --- a/libimagcounter/src/counter.rs +++ b/libimagcounter/src/counter.rs @@ -30,7 +30,7 @@ impl<'a> Counter<'a> { let fle = { let lockentry = store.create(ModuleEntryPath::new(name.clone()).into_storeid()); if lockentry.is_err() { - return Err(CE::new(CEK::StoreWriteError, Some(Box::new(lockentry.err().unwrap())))); + return Err(CE::new(CEK::StoreWriteError, Some(Box::new(lockentry.unwrap_err())))); } let mut lockentry = lockentry.unwrap(); @@ -39,17 +39,17 @@ impl<'a> Counter<'a> { let mut header = entry.get_header_mut(); let setres = header.set("counter", Value::Table(BTreeMap::new())); if setres.is_err() { - return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); + return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.unwrap_err())))); } let setres = header.set("counter.name", Value::String(name)); if setres.is_err() { - return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); + return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.unwrap_err())))); } let setres = header.set("counter.value", Value::Integer(init)); if setres.is_err() { - return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); + return Err(CE::new(CEK::StoreWriteError, Some(Box::new(setres.unwrap_err())))); } }