diff --git a/src/tools.rs b/src/tools.rs index 77e985ab..da512aa8 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -326,9 +326,9 @@ pub fn scandir( dirfd: RawFd, path: P, regex: ®ex::Regex, - callback: F + mut callback: F ) -> Result<(), Error> - where F: Fn(RawFd, &str, nix::dir::Type) -> Result<(), Error>, + where F: FnMut(RawFd, &str, nix::dir::Type) -> Result<(), Error>, P: AsRef { use nix::fcntl::OFlag;