summaryrefslogtreecommitdiffstats
path: root/ignore/src/walk.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ignore/src/walk.rs')
-rw-r--r--ignore/src/walk.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/ignore/src/walk.rs b/ignore/src/walk.rs
index 57f795c1..df796d41 100644
--- a/ignore/src/walk.rs
+++ b/ignore/src/walk.rs
@@ -379,7 +379,18 @@ impl DirEntryRaw {
})
}
- #[cfg(not(unix))]
+ // Placeholder implementation to allow compiling on non-standard platforms (e.g. wasm32).
+ #[cfg(not(any(windows, unix)))]
+ fn from_entry_os(
+ depth: usize,
+ ent: &fs::DirEntry,
+ ty: fs::FileType,
+ ) -> Result<DirEntryRaw, Error> {
+ Err(Error::Io(io::Error::new(
+ io::ErrorKind::Other, "unsupported platform")))
+ }
+
+ #[cfg(windows)]
fn from_path(
depth: usize,
pb: PathBuf,
@@ -416,6 +427,17 @@ impl DirEntryRaw {
ino: md.ino(),
})
}
+
+ // Placeholder implementation to allow compiling on non-standard platforms (e.g. wasm32).
+ #[cfg(not(any(windows, unix)))]
+ fn from_path(
+ depth: usize,
+ pb: PathBuf,
+ link: bool,
+ ) -> Result<DirEntryRaw, Error> {
+ Err(Error::Io(io::Error::new(
+ io::ErrorKind::Other, "unsupported platform")))
+ }
}
/// WalkBuilder builds a recursive directory iterator.