mirror of
https://github.com/BurntSushi/walkdir.git
synced 2025-09-29 22:50:27 +00:00
redox: remove uses of Unix-only things
The code for `cfg(not(any(unix, windows)))` is untested and contained a few errors that this commit cleans up.
This commit is contained in:
commit
4b21b55f21
@ -1108,8 +1108,6 @@ impl DirEntry {
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn from_entry(depth: usize, ent: &fs::DirEntry) -> Result<DirEntry> {
|
||||
use std::os::unix::fs::DirEntryExt;
|
||||
|
||||
let ty = ent.file_type().map_err(|err| {
|
||||
Error::from_path(depth, ent.path(), err)
|
||||
})?;
|
||||
@ -1153,8 +1151,6 @@ impl DirEntry {
|
||||
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
fn from_link(depth: usize, pb: PathBuf) -> Result<DirEntry> {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
let md = fs::metadata(&pb).map_err(|err| {
|
||||
Error::from_path(depth, pb.clone(), err)
|
||||
})?;
|
||||
@ -1197,7 +1193,6 @@ impl Clone for DirEntry {
|
||||
ty: self.ty,
|
||||
follow_link: self.follow_link,
|
||||
depth: self.depth,
|
||||
ino: self.ino,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user