diff options
| author | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2022-12-09 15:04:36 +0100 |
|---|---|---|
| committer | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2022-12-09 15:04:36 +0100 |
| commit | 24cd863a3815f7ae7828c9f161a0b3f863218106 (patch) | |
| tree | 9da8e5f3b295daae596e40bb3986936951ca7264 /library/std | |
| parent | 4198d2975dd24322515f8894a3ac06e342aad183 (diff) | |
Replace hand-made masking by call to masked() method in FileType
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/sys/unix/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs index e4643880690..fb8d06c6682 100644 --- a/library/std/src/sys/unix/fs.rs +++ b/library/std/src/sys/unix/fs.rs @@ -560,7 +560,7 @@ impl FileType { } pub fn is(&self, mode: mode_t) -> bool { - self.mode & libc::S_IFMT == mode + self.masked() == mode } fn masked(&self) -> mode_t { |
