summaryrefslogtreecommitdiffstats
path: root/libimagcounter
diff options
context:
space:
mode:
authorKai Sickeler <k.sickeler@gmail.com>2016-07-16 20:44:50 +0200
committerKai Sickeler <k.sickeler@gmail.com>2016-07-27 17:40:20 +0200
commit7e4166acbff3bf60c3be2bcd713658b94a4659f0 (patch)
tree78e3e0dd24e983ead4f027078510caf7f54fde79 /libimagcounter
parentcd182c73f4400a9a688179f7fbf12f444fdd37b7 (diff)
changed Unit-String to CounterUnit-Type
Diffstat (limited to 'libimagcounter')
-rw-r--r--libimagcounter/src/counter.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/libimagcounter/src/counter.rs b/libimagcounter/src/counter.rs
index 76101049..f0ccc217 100644
--- a/libimagcounter/src/counter.rs
+++ b/libimagcounter/src/counter.rs
@@ -137,12 +137,10 @@ impl<'a> Counter<'a> {
pub fn unit(&self) -> Result<CounterUnit> {
self.fle.get_header().read("counter.unit")
.map_err(|e| CEK::StoreWriteError.into_error_with_cause(Box::new(e)))
- .and_then(|u|
- match u {
- Some(Value::String(s)) => Ok(CounterUnit(s)),
- _ => Err(CEK::HeaderTypeError.into_error())
- }
- )
+ .and_then(|u| match u {
+ Some(Value::String(s)) => Ok(CounterUnit(s)),
+ _ => Err(CEK::HeaderTypeError.into_error())
+ })
}
pub fn load(name: CounterName, store: &Store) -> Result<Counter> {