summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/genlist.rs2
-rw-r--r--src/index.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/genlist.rs b/src/genlist.rs
index 5eec248..dbc437a 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 }
}
diff --git a/src/index.rs b/src/index.rs
index 6628b50..83f854c 100644
--- a/src/index.rs
+++ b/src/index.rs
@@ -138,7 +138,7 @@ mod test {
let meta = ChunkMeta::new_generation("abc", "timestamp");
let dir = tempdir().unwrap();
let mut idx = new_index(dir.path());
- idx.insert_meta(id.clone(), meta.clone()).unwrap();
+ idx.insert_meta(id.clone(), meta).unwrap();
assert_eq!(idx.find_generations().unwrap(), vec![id]);
}
@@ -148,7 +148,7 @@ mod test {
let meta = ChunkMeta::new_generation("abc", "timestamp");
let dir = tempdir().unwrap();
let mut idx = new_index(dir.path());
- idx.insert_meta(id.clone(), meta.clone()).unwrap();
+ idx.insert_meta(id.clone(), meta).unwrap();
idx.remove_meta(&id).unwrap();
assert_eq!(idx.find_generations().unwrap(), vec![]);
}