Skip to content

Commit 3c176bc

Browse files
committed
Minor refactor
1 parent f570e56 commit 3c176bc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/volume_mgr.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ where
264264
// with an ID which doesn't exist in our open dirs list.
265265
let idx_to_close = cluster_position_by_id(&self.open_dirs, dir.search_id).unwrap();
266266
self.open_dirs.remove(idx_to_close);
267-
drop(dir);
268267
}
269268

270269
/// Look in a directory for a named file.
@@ -664,7 +663,6 @@ where
664663
let idx_to_close = cluster_position_by_id(&self.open_files, file.search_id).unwrap();
665664
self.open_files.remove(idx_to_close);
666665

667-
drop(file);
668666
Ok(())
669667
}
670668

@@ -733,8 +731,8 @@ where
733731
}
734732
}
735733

736-
fn cluster_position_by_id(vec: &[ClusterDescriptor], id_to_find: SearchId) -> Option<usize> {
737-
vec.iter().position(|f| f.compare_id(id_to_find))
734+
fn cluster_position_by_id(list: &[ClusterDescriptor], id_to_find: SearchId) -> Option<usize> {
735+
list.iter().position(|f| f.compare_id(id_to_find))
738736
}
739737

740738
fn cluster_already_open(

0 commit comments

Comments
 (0)