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 { + 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 { + Err(Error::Io(io::Error::new( + io::ErrorKind::Other, "unsupported platform"))) + } } /// WalkBuilder builds a recursive directory iterator.