diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-10-30 18:40:53 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-10-30 18:46:29 +0100 |
commit | fd2367b84973fa803e4d15c03b883495efafad53 (patch) | |
tree | c4a3faeb3e2b481f87f76314733486bd3a809cba /bin/domain/imag-timetrack/src/track.rs | |
parent | d7eda6c451db81225d091c5513600fd6004d0643 (diff) |
imag-timetrack: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-timetrack/src/track.rs')
-rw-r--r-- | bin/domain/imag-timetrack/src/track.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/domain/imag-timetrack/src/track.rs b/bin/domain/imag-timetrack/src/track.rs index ffc9020f..0e709615 100644 --- a/bin/domain/imag-timetrack/src/track.rs +++ b/bin/domain/imag-timetrack/src/track.rs @@ -22,10 +22,10 @@ use std::process::exit; use clap::ArgMatches; use chrono::naive::NaiveDate; use chrono::naive::NaiveDateTime; +use failure::Error; use libimagrt::runtime::Runtime; use libimagerror::trace::trace_error; -use libimagtimetrack::error::TimeTrackError as TTE; use libimagtimetrack::tag::TimeTrackingTag; use libimagtimetrack::timetrackingstore::TimeTrackStore; use libimagerror::trace::MapErrTrace; @@ -43,10 +43,10 @@ pub fn track(rt: &Runtime) -> i32 { match cmd.value_of(clap_name) { Some("now") => Some(::chrono::offset::Local::now().naive_local()), Some(els) => { - match NaiveDateTime::parse_from_str(els, DATE_TIME_PARSE_FMT).map_err(TTE::from) { + match NaiveDateTime::parse_from_str(els, DATE_TIME_PARSE_FMT).map_err(Error::from) { Ok(ndt) => Some(ndt), Err(e_ndt) => { - match NaiveDate::parse_from_str(els, DATE_PARSE_FMT).map_err(TTE::from) { + match NaiveDate::parse_from_str(els, DATE_PARSE_FMT).map_err(Error::from) { Ok(ndt) => Some(ndt.and_hms(0, 0, 0)), Err(e_nd) => { error!("Cannot parse date {}:", errname); |