replaced implementation of reset with call to set function

This commit is contained in:
Kai Sickeler 2016-07-27 18:54:09 +02:00
parent 4cbd81ed20
commit 1c5cb7d21d

View file

@ -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<()> {