Replace hand-made masking by call to masked() method in FileType
This commit is contained in:
parent
4198d2975d
commit
24cd863a38
@ -560,7 +560,7 @@ pub fn is_symlink(&self) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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