diff options
author | flip1995 <hello@philkrones.com> | 2019-08-27 10:23:03 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-08-28 18:18:41 +0200 |
commit | 4301e80cf25fa857aa36871604500c9d3936ab76 (patch) | |
tree | ca79e38802e165f2952896e5ce3c3e6ba620f926 | |
parent | 8726cb12cf79bd401a061f2775df718368f6cdd1 (diff) |
[No-auto] lib/domain/timetrack: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | lib/domain/libimagtimetrack/src/iter/filter.rs | 6 | ||||
-rw-r--r-- | lib/domain/libimagtimetrack/src/iter/storeid.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/domain/libimagtimetrack/src/iter/filter.rs b/lib/domain/libimagtimetrack/src/iter/filter.rs index b0114c33..d13bfa6e 100644 --- a/lib/domain/libimagtimetrack/src/iter/filter.rs +++ b/lib/domain/libimagtimetrack/src/iter/filter.rs @@ -49,7 +49,7 @@ pub fn has_end_time_where<F>(f: F) -> HasEndTimeWhere<F> HasEndTimeWhere::new(f) } -pub fn has_one_of_tags<'a>(tags: &'a Vec<TTT>) -> HasOneOfTags<'a> { +pub fn has_one_of_tags(tags: &[TTT]) -> HasOneOfTags<'_> { HasOneOfTags::new(tags) } @@ -100,10 +100,10 @@ mod types { } } - pub struct HasOneOfTags<'a>(&'a Vec<TTT>); + pub struct HasOneOfTags<'a>(&'a [TTT]); impl<'a> HasOneOfTags<'a> { - pub fn new(tags: &'a Vec<TTT>) -> HasOneOfTags<'a> { + pub fn new(tags: &'a [TTT]) -> HasOneOfTags<'a> { HasOneOfTags(tags) } } diff --git a/lib/domain/libimagtimetrack/src/iter/storeid.rs b/lib/domain/libimagtimetrack/src/iter/storeid.rs index 0c747a63..68718f8a 100644 --- a/lib/domain/libimagtimetrack/src/iter/storeid.rs +++ b/lib/domain/libimagtimetrack/src/iter/storeid.rs @@ -39,7 +39,7 @@ impl TagStoreIdIter { TagStoreIdIter { inner, datetime } } - pub fn create_entries<'a>(self, store: &'a Store) -> CreateTimeTrackIter<'a> { + pub fn create_entries(self, store: &Store) -> CreateTimeTrackIter<'_> { CreateTimeTrackIter::new(self, store) } @@ -56,7 +56,7 @@ impl Iterator for TagStoreIdIter { let id_str = format!("{}-{}", dt, tag.as_str()); crate::module_path::new_id(id_str) .map_err(Error::from) - .map(|id| (id, self.datetime.clone())) + .map(|id| (id, self.datetime)) })) } } |