[No-auto] lib/domain/timetrack: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:23:03 +02:00 committed by Matthias Beyer
parent 8726cb12cf
commit 4301e80cf2
2 changed files with 5 additions and 5 deletions

View file

@ -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)
}
}

View file

@ -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))
}))
}
}