diff options
Diffstat (limited to 'src/genlist.rs')
-rw-r--r-- | src/genlist.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/genlist.rs b/src/genlist.rs index 5eec248..9d7e39d 100644 --- a/src/genlist.rs +++ b/src/genlist.rs @@ -13,7 +13,7 @@ pub enum GenerationListError { impl GenerationList { pub fn new(gens: Vec<FinishedGeneration>) -> Self { - let mut list = gens.clone(); + let mut list = gens; list.sort_by_cached_key(|gen| gen.ended().to_string()); Self { list } } @@ -33,7 +33,7 @@ impl GenerationList { let hits: Vec<FinishedGeneration> = self .iter() .filter(|gen| gen.id() == genref) - .map(|gen| gen.clone()) + .cloned() .collect(); if hits.len() == 1 { Some(hits[0].clone()) |