Skip to content

Commit bc95124

Browse files
jcaesarsharkdp
authored andcommitted
Fix compiling for wasi
1 parent 4a3fce7 commit bc95124

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/fs.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
use std::fs;
22

3-
#[cfg(any(unix, target_os = "redox"))]
4-
use std::os::unix::fs::PermissionsExt;
5-
63
#[cfg(any(unix, target_os = "redox"))]
74
pub fn is_executable(md: &fs::Metadata) -> bool {
5+
use std::os::unix::fs::PermissionsExt;
86
md.permissions().mode() & 0o111 != 0
97
}
108

11-
#[cfg(windows)]
9+
#[cfg(any(windows, target_os = "wasi"))]
1210
pub fn is_executable(_: &fs::Metadata) -> bool {
1311
false
1412
}

0 commit comments

Comments
 (0)