Remove unused keyword "mut"
This commit is contained in:
parent
e4e3c05f05
commit
1d5ed2c3d5
1 changed files with 3 additions and 5 deletions
|
@ -33,7 +33,7 @@ impl<'a> Counter<'a> {
|
||||||
|
|
||||||
debug!("Creating new counter: '{}' with value: {}", name, init);
|
debug!("Creating new counter: '{}' with value: {}", name, init);
|
||||||
let fle = {
|
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() {
|
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.err().unwrap()))));
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,7 @@ impl<'a> Counter<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn name(&self) -> Result<CounterName> {
|
pub fn name(&self) -> Result<CounterName> {
|
||||||
let mut header = self.fle.deref().get_header();
|
self.fle.get_header().read("counter.name")
|
||||||
header.read("counter.name")
|
|
||||||
.map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e))))
|
.map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e))))
|
||||||
.and_then(|v| {
|
.and_then(|v| {
|
||||||
match v {
|
match v {
|
||||||
|
@ -117,8 +116,7 @@ impl<'a> Counter<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn value(&self) -> Result<i64> {
|
pub fn value(&self) -> Result<i64> {
|
||||||
let mut header = self.fle.deref().get_header();
|
self.fle.get_header().read("counter.value")
|
||||||
header.read("counter.value")
|
|
||||||
.map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e))))
|
.map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e))))
|
||||||
.and_then(|v| {
|
.and_then(|v| {
|
||||||
match v {
|
match v {
|
||||||
|
|
Loading…
Reference in a new issue