summaryrefslogtreecommitdiffstats
path: root/src/file.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-05-03 16:35:44 +0100
committerBen S <ogham@bsago.me>2015-05-03 16:35:44 +0100
commit42a347c063909ae658884293d8a4074200b504dc (patch)
treefda734525ecb086950a8019ec920ce242569d40c /src/file.rs
parentffcc6fa1793b9f92fda0f001de81230900560fac (diff)
Use OS-defined permission bits type
Diffstat (limited to 'src/file.rs')
-rw-r--r--src/file.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file.rs b/src/file.rs
index afa6bf5..0a96527 100644
--- a/src/file.rs
+++ b/src/file.rs
@@ -3,6 +3,7 @@ use std::env::current_dir;
use std::fs;
use std::io;
use std::os::unix;
+use std::os::unix::raw::mode_t;
use std::os::unix::fs::{MetadataExt, PermissionsExt};
use std::path::{Component, Path, PathBuf};
@@ -423,7 +424,7 @@ impl<'a> File<'a> {
}
/// Helper method for the permissions string.
- fn permission_bit(bits: u16, bit: u16, character: &'static str, style: Style) -> ANSIString<'static> {
+ fn permission_bit(bits: mode_t, bit: mode_t, character: &'static str, style: Style) -> ANSIString<'static> {
let bi32 = bit as u16;
if bits & bi32 == bi32 {
style.paint(character)