From 601dd405b6ced34e38735032de38c210f9e1790d Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:46:47 +0200 Subject: [PATCH] [Auto] lib/domain/timetrack: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- lib/domain/libimagtimetrack/src/constants.rs | 10 +++++----- lib/domain/libimagtimetrack/src/iter/create.rs | 4 ++-- lib/domain/libimagtimetrack/src/iter/tag.rs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/domain/libimagtimetrack/src/constants.rs b/lib/domain/libimagtimetrack/src/constants.rs index e6209843..a83d999b 100644 --- a/lib/domain/libimagtimetrack/src/constants.rs +++ b/lib/domain/libimagtimetrack/src/constants.rs @@ -17,9 +17,9 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // -pub const CRATE_NAME : &'static str = "timetrack"; -pub const DATE_TIME_FORMAT : &'static str = "%Y-%m-%dT%H:%M:%S"; -pub const DATE_TIME_START_HEADER_PATH : &'static str = "timetrack.start"; -pub const DATE_TIME_END_HEADER_PATH : &'static str = "timetrack.end"; -pub const DATE_TIME_TAG_HEADER_PATH : &'static str = "timetrack.tag"; +pub const CRATE_NAME : &str = "timetrack"; +pub const DATE_TIME_FORMAT : &str = "%Y-%m-%dT%H:%M:%S"; +pub const DATE_TIME_START_HEADER_PATH : &str = "timetrack.start"; +pub const DATE_TIME_END_HEADER_PATH : &str = "timetrack.end"; +pub const DATE_TIME_TAG_HEADER_PATH : &str = "timetrack.tag"; diff --git a/lib/domain/libimagtimetrack/src/iter/create.rs b/lib/domain/libimagtimetrack/src/iter/create.rs index d08fc253..e7d41d74 100644 --- a/lib/domain/libimagtimetrack/src/iter/create.rs +++ b/lib/domain/libimagtimetrack/src/iter/create.rs @@ -40,8 +40,8 @@ impl<'a> CreateTimeTrackIter<'a> { pub fn new(inner: TagStoreIdIter, store: &'a Store) -> CreateTimeTrackIter<'a> { CreateTimeTrackIter { - inner: inner, - store: store, + inner, + store, } } diff --git a/lib/domain/libimagtimetrack/src/iter/tag.rs b/lib/domain/libimagtimetrack/src/iter/tag.rs index fcc006d2..4f2a1eee 100644 --- a/lib/domain/libimagtimetrack/src/iter/tag.rs +++ b/lib/domain/libimagtimetrack/src/iter/tag.rs @@ -19,7 +19,7 @@ use chrono::naive::NaiveDateTime as NDT; use failure::Fallible as Result; -use failure::Error; + use failure::err_msg; use crate::tag::TimeTrackingTag as TTT; @@ -48,7 +48,7 @@ impl Iterator for TagIter { .map(|t| if is_tag_str(&t).is_ok() { Ok(TTT::from(t)) } else { - Err(Error::from(err_msg("Error in Tag format"))) + Err(err_msg("Error in Tag format")) }) } }