Skip to content

Commit

Permalink
Make read_dir method take a mutable callback
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 22, 2024
1 parent 3186d17 commit d9962bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit d9962bb

Please sign in to comment.