From 157f6c0129f64145ea559e5144a23882028624c4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 20 Jul 2017 23:02:48 +0200 Subject: [PATCH] Fix TimeTracking::get_timetrack_tag() for Entry --- libimagentrytimetrack/src/timetracking.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libimagentrytimetrack/src/timetracking.rs b/libimagentrytimetrack/src/timetracking.rs index 625238dd..ba40ac65 100644 --- a/libimagentrytimetrack/src/timetracking.rs +++ b/libimagentrytimetrack/src/timetracking.rs @@ -66,9 +66,10 @@ impl TimeTracking for Entry { self.get_header() .read(DATE_TIME_TAG_HEADER_PATH) .map_err_into(TTEK::HeaderReadError) - .map(|value| match value { - Some(&Value::String(ref s)) => s.clone().into(), - _ => unimplemented!(), + .and_then(|value| match value { + Some(&Value::String(ref s)) => Ok(s.clone().into()), + Some(_) => Err(TTEK::HeaderFieldTypeError.into_error()), + _ => Err(TTEK::HeaderReadError.into_error()) }) }