Commit d378dd1e authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Fix warnings

parent b223c694
......@@ -84,7 +84,7 @@ fn check_full_path(path: &Path, mode: libc::c_int) -> bool
fn inner_visit(path: &Path,
metadata: &Metadata,
checkpath: bool,
cb: &Fn(&Path, &Metadata)) -> io::Result<()>
cb: &dyn Fn(&Path, &Metadata)) -> io::Result<()>
{
if checkpath {
if metadata.file_type().is_dir() {
......@@ -138,7 +138,7 @@ fn inner_visit(path: &Path,
Ok(())
}
pub fn visit(path: &Path, cb: &Fn(&Path, &Metadata)) -> io::Result<()>
pub fn visit(path: &Path, cb: &dyn Fn(&Path, &Metadata)) -> io::Result<()>
{
let checkpath = need_access_check();
let metadata = symlink_metadata(path);
......@@ -161,7 +161,7 @@ pub fn visit(path: &Path, cb: &Fn(&Path, &Metadata)) -> io::Result<()>
return Ok(());
} else {
let metadata = metadata.unwrap();
try!(inner_visit(&path, &metadata, checkpath, cb));
inner_visit(&path, &metadata, checkpath, cb)?;
}
Ok(())
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment