mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Replace hand-made masking by call to masked() method in FileType
This commit is contained in:
parent
4198d2975d
commit
24cd863a38
@ -560,7 +560,7 @@ impl FileType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn is(&self, mode: mode_t) -> bool {
|
pub fn is(&self, mode: mode_t) -> bool {
|
||||||
self.mode & libc::S_IFMT == mode
|
self.masked() == mode
|
||||||
}
|
}
|
||||||
|
|
||||||
fn masked(&self) -> mode_t {
|
fn masked(&self) -> mode_t {
|
||||||
|
Loading…
Reference in New Issue
Block a user