diff options
| author | Trevor Merrifield <trevorm42@gmail.com> | 2017-09-17 17:42:58 -0400 |
|---|---|---|
| committer | Trevor Merrifield <trevorm42@gmail.com> | 2017-09-17 20:13:33 -0400 |
| commit | 6ae9fc277287e4f207012ab65be24058f143d42d (patch) | |
| tree | 6dd0128eb2cef51f1027752689061512ac3fe1ca /src/libstd/sys/unix | |
| parent | 04c01e0b1fc4830f4416c79d886c2f1a54986fe9 (diff) | |
| download | rust-6ae9fc277287e4f207012ab65be24058f143d42d.tar.gz rust-6ae9fc277287e4f207012ab65be24058f143d42d.zip | |
Remove st_mode mask
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/ext/fs.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index 96c0f4eab42..3e631ad40ac 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -68,8 +68,8 @@ impl FileExt for fs::File { /// Unix-specific extensions to `Permissions` #[stable(feature = "fs_ext", since = "1.1.0")] pub trait PermissionsExt { - /// Returns the 12 least significant bits of `st_mode` which are the - /// standard Unix permissions for this file. + /// Returns the underlying raw `st_mode` bits that contain the standard + /// Unix permissions for this file. /// /// # Examples /// diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index e0ce02873f5..c4616c3b395 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -95,7 +95,7 @@ pub struct DirBuilder { mode: mode_t } impl FileAttr { pub fn size(&self) -> u64 { self.stat.st_size as u64 } pub fn perm(&self) -> FilePermissions { - FilePermissions { mode: (self.stat.st_mode as mode_t) & 0o7777 } + FilePermissions { mode: (self.stat.st_mode as mode_t) } } pub fn file_type(&self) -> FileType { |
