From 24cd863a3815f7ae7828c9f161a0b3f863218106 Mon Sep 17 00:00:00 2001 From: Arthur Carcano Date: Fri, 9 Dec 2022 15:04:36 +0100 Subject: [PATCH] Replace hand-made masking by call to masked() method in FileType --- library/std/src/sys/unix/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {