From 1d5ed2c3d57f4590792880c6f628b4920b18b089 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 16 Apr 2016 17:54:38 +0200 Subject: [PATCH] Remove unused keyword "mut" --- libimagcounter/src/counter.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libimagcounter/src/counter.rs b/libimagcounter/src/counter.rs index 18d5ca30..a0103f5e 100644 --- a/libimagcounter/src/counter.rs +++ b/libimagcounter/src/counter.rs @@ -33,7 +33,7 @@ impl<'a> Counter<'a> { debug!("Creating new counter: '{}' with value: {}", name, init); let fle = { - let mut lockentry = store.create(ModuleEntryPath::new(name.clone()).into_storeid()); + 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())))); } @@ -105,8 +105,7 @@ impl<'a> Counter<'a> { } pub fn name(&self) -> Result { - let mut header = self.fle.deref().get_header(); - header.read("counter.name") + self.fle.get_header().read("counter.name") .map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e)))) .and_then(|v| { match v { @@ -117,8 +116,7 @@ impl<'a> Counter<'a> { } pub fn value(&self) -> Result { - let mut header = self.fle.deref().get_header(); - header.read("counter.value") + self.fle.get_header().read("counter.value") .map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e)))) .and_then(|v| { match v {