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/year.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/year.rs')
-rw-r--r-- | bin/domain/imag-timetrack/src/year.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/domain/imag-timetrack/src/year.rs b/bin/domain/imag-timetrack/src/year.rs index 7904c6d3..2d5c70f1 100644 --- a/bin/domain/imag-timetrack/src/year.rs +++ b/bin/domain/imag-timetrack/src/year.rs @@ -22,13 +22,13 @@ use std::str::FromStr; use filters::filter::Filter; use chrono::NaiveDateTime; +use failure::Error; use libimagerror::trace::trace_error; use libimagerror::trace::MapErrTrace; use libimagerror::iter::TraceIterator; use libimagerror::io::ToExitCode; use libimagstore::store::FileLockEntry; -use libimagtimetrack::error::TimeTrackError as TTE; use libimagtimetrack::timetrackingstore::TimeTrackStore; use libimagtimetrack::timetracking::TimeTracking; use libimagtimetrack::tag::TimeTrackingTag; @@ -49,7 +49,7 @@ pub fn year(rt: &Runtime) -> i32 { let start = match cmd .value_of("start") .map(|s| { - ::chrono::naive::NaiveDateTime::from_str(s).map_err(TTE::from) + ::chrono::naive::NaiveDateTime::from_str(s).map_err(Error::from) }) { None => NaiveDate::from_ymd(now.year(), 1, 1).and_hms(0, 0, 0), @@ -63,7 +63,7 @@ pub fn year(rt: &Runtime) -> i32 { let end = match cmd .value_of("end") .map(|s| { - ::chrono::naive::NaiveDateTime::from_str(s).map_err(TTE::from) + ::chrono::naive::NaiveDateTime::from_str(s).map_err(Error::from) }) { None => { @@ -104,7 +104,7 @@ pub fn year(rt: &Runtime) -> i32 { .map_err_trace_exit_unwrap(1) .trace_unwrap() .filter(|e| filter.filter(e)) - .map(|e| -> Result<_, TTE> { + .map(|e| -> Result<_, Error> { debug!("Processing {:?}", e.get_location()); let tag = e.get_timetrack_tag()?; |