From cce1676a9e3f02eb0d8bba30d3c4f32504e2a536 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 20 Jan 2019 17:49:11 +0100 Subject: [PATCH] tools.rs: use FnMut for scandir callback --- src/tools.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;