Skip to content

Commit

Permalink
Replace hand-made masking by call to masked() method in FileType
Browse files Browse the repository at this point in the history
  • Loading branch information
krtab committed Dec 9, 2022
1 parent 4198d29 commit 24cd863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 24cd863

Please sign in to comment.