tools.rs: use FnMut for scandir callback
This commit is contained in:
parent
443f3743bb
commit
cce1676a9e
@ -326,9 +326,9 @@ pub fn scandir<P, F>(
|
|||||||
dirfd: RawFd,
|
dirfd: RawFd,
|
||||||
path: P,
|
path: P,
|
||||||
regex: ®ex::Regex,
|
regex: ®ex::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;
|
||||||
|
Loading…
Reference in New Issue
Block a user