From 1c5cb7d21d52167d99cc11c630409b539aca0bf6 Mon Sep 17 00:00:00 2001 From: Kai Sickeler Date: Wed, 27 Jul 2016 18:54:09 +0200 Subject: [PATCH] replaced implementation of reset with call to set function --- libimagcounter/src/counter.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libimagcounter/src/counter.rs b/libimagcounter/src/counter.rs index 7fdc8a66..cd8fbd2e 100644 --- a/libimagcounter/src/counter.rs +++ b/libimagcounter/src/counter.rs @@ -119,10 +119,7 @@ impl<'a> Counter<'a> { } pub fn reset(&mut self) -> Result<()> { - let mut header = self.fle.deref_mut().get_header_mut(); - header.set("counter.value", Value::Integer(0)) - .map_err(|e| CE::new(CEK::StoreWriteError, Some(Box::new(e)))) - .map(|_| ()) + self.set(0) } pub fn set(&mut self, v: i64) -> Result<()> {