diff --git a/git-odb/src/store_impls/dynamic/load_index.rs b/git-odb/src/store_impls/dynamic/load_index.rs index a82571cf32d..aac07f065c2 100644 --- a/git-odb/src/store_impls/dynamic/load_index.rs +++ b/git-odb/src/store_impls/dynamic/load_index.rs @@ -257,7 +257,7 @@ impl super::Store { .unwrap_or(0); let mut num_indices_checked = 0; let mut needs_generation_change = false; - let mut slot_indices_to_remove: Vec<_> = idx_by_index_path.into_values().collect(); + let mut slot_indices_to_remove: Vec<_> = idx_by_index_path.into_iter().map(|(_, v)| v).collect(); while let Some((mut index_info, mtime, move_from_slot_idx)) = index_paths_to_add.pop_front() { 'increment_slot_index: loop { if num_indices_checked == self.files.len() { diff --git a/git-odb/src/store_impls/dynamic/types.rs b/git-odb/src/store_impls/dynamic/types.rs index 52a3a05e479..af376e0b81e 100644 --- a/git-odb/src/store_impls/dynamic/types.rs +++ b/git-odb/src/store_impls/dynamic/types.rs @@ -211,16 +211,16 @@ impl OnDiskFile { match std::mem::replace(&mut self.state, OnDiskFileState::Missing) { OnDiskFileState::Garbage(v) => self.state = OnDiskFileState::Loaded(v), OnDiskFileState::Missing => self.state = OnDiskFileState::Unloaded, - other @ (OnDiskFileState::Loaded(_) | OnDiskFileState::Unloaded) => self.state = other, + other @ OnDiskFileState::Loaded(_) | other @ OnDiskFileState::Unloaded => self.state = other, } } pub fn trash(&mut self) { match std::mem::replace(&mut self.state, OnDiskFileState::Missing) { OnDiskFileState::Loaded(v) => self.state = OnDiskFileState::Garbage(v), - other @ (OnDiskFileState::Garbage(_) | OnDiskFileState::Unloaded | OnDiskFileState::Missing) => { - self.state = other - } + other @ OnDiskFileState::Garbage(_) + | other @ OnDiskFileState::Unloaded + | other @ OnDiskFileState::Missing => self.state = other, } } }