Skip to content

Commit 24cd863

Browse files
committed
Replace hand-made masking by call to masked() method in FileType
1 parent 4198d29 commit 24cd863

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/unix

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/fs.rs

+1-1
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)