tools.rs: use FnMut for scandir callback

This commit is contained in:
Dietmar Maurer 2019-01-20 17:49:11 +01:00
parent 443f3743bb
commit cce1676a9e

View File

@ -326,9 +326,9 @@ pub fn scandir<P, F>(
dirfd: RawFd, dirfd: RawFd,
path: P, path: P,
regex: &regex::Regex, regex: &regex::Regex,
callback: F mut callback: F
) -> Result<(), Error> ) -> Result<(), Error>
where F: Fn(RawFd, &str, nix::dir::Type) -> Result<(), Error>, where F: FnMut(RawFd, &str, nix::dir::Type) -> Result<(), Error>,
P: AsRef<Path> P: AsRef<Path>
{ {
use nix::fcntl::OFlag; use nix::fcntl::OFlag;