Skip to content

Commit 84cfa4d

Browse files
committed
Replace hand-made masking by call to masked() method in FileType
1 parent 526c82a commit 84cfa4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/src/sys/unix/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ impl FileType {
560560
}
561561

562562
pub fn is(&self, mode: mode_t) -> bool {
563-
self.mode & libc::S_IFMT == mode
563+
self.masked() == mode
564564
}
565565

566566
fn masked(&self) -> mode_t {

0 commit comments

Comments
 (0)