diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-06-28 21:13:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-28 21:13:39 -0400 |
commit | e46101071ee2e1867a3b9b66ab8ae113f1974b56 (patch) | |
tree | c82ff1f6d2043d8fd0b121a6ead1bae089ebdf0a | |
parent | a462ebe2140323a6085ce5a064727288fa4dff3c (diff) | |
parent | 5b574da8cf17dbeeaa9932d7db220d7ce73f61a5 (diff) |
Merge pull request #27 from austinhyde/fix-build
Fix bitwise-and build issues on macOS
-rw-r--r-- | src/util/unix.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/unix.rs b/src/util/unix.rs index 2113fc1..6a52c3a 100644 --- a/src/util/unix.rs +++ b/src/util/unix.rs @@ -3,7 +3,7 @@ use std::path::Path; pub fn is_executable(mode: u32) -> bool { const LIBC_PERMISSION_VALS: [libc::mode_t; 3] = [libc::S_IXUSR, libc::S_IXGRP, libc::S_IXOTH]; - LIBC_PERMISSION_VALS.iter().any(|val| mode & *val != 0) + LIBC_PERMISSION_VALS.iter().any(|val| mode & (*val as u32) != 0) } pub fn stringify_mode(mode: u32) -> String { |