mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 10:55:14 +00:00
Make read_dir
method take a mutable callback
This commit is contained in:
parent
3186d17d56
commit
d9962bb4d8
@ -387,7 +387,7 @@ pub fn recursive_diff(dir1: impl AsRef<Path>, dir2: impl AsRef<Path>) {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn read_dir<F: Fn(&Path)>(dir: impl AsRef<Path>, callback: F) {
|
||||
pub fn read_dir<F: FnMut(&Path)>(dir: impl AsRef<Path>, mut callback: F) {
|
||||
for entry in fs_wrapper::read_dir(dir) {
|
||||
callback(&entry.unwrap().path());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user