mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 22:06:26 +00:00
Merge pull request #2 from ebfe/fix-build-master
Fix build with rust master
This commit is contained in:
commit
aac69017e7
10
src/file.rs
10
src/file.rs
@ -109,13 +109,13 @@ impl<'a> File<'a> {
|
|||||||
// the time.
|
// the time.
|
||||||
HardLinks => {
|
HardLinks => {
|
||||||
let style = if self.stat.kind == io::TypeFile && self.stat.unstable.nlink > 1 { Red.on(Yellow) } else { Red.normal() };
|
let style = if self.stat.kind == io::TypeFile && self.stat.unstable.nlink > 1 { Red.on(Yellow) } else { Red.normal() };
|
||||||
style.paint(self.stat.unstable.nlink.to_str().as_slice())
|
style.paint(self.stat.unstable.nlink.to_string().as_slice())
|
||||||
},
|
},
|
||||||
|
|
||||||
Inode => Purple.paint(self.stat.unstable.inode.to_str().as_slice()),
|
Inode => Purple.paint(self.stat.unstable.inode.to_string().as_slice()),
|
||||||
Blocks => {
|
Blocks => {
|
||||||
if self.stat.kind == io::TypeFile || self.stat.kind == io::TypeSymlink {
|
if self.stat.kind == io::TypeFile || self.stat.kind == io::TypeSymlink {
|
||||||
Cyan.paint(self.stat.unstable.blocks.to_str().as_slice())
|
Cyan.paint(self.stat.unstable.blocks.to_string().as_slice())
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Grey.paint("-")
|
Grey.paint("-")
|
||||||
@ -128,13 +128,13 @@ impl<'a> File<'a> {
|
|||||||
let uid = self.stat.unstable.uid as u32;
|
let uid = self.stat.unstable.uid as u32;
|
||||||
unix.load_user(uid);
|
unix.load_user(uid);
|
||||||
let style = if unix.uid == uid { Yellow.bold() } else { Plain };
|
let style = if unix.uid == uid { Yellow.bold() } else { Plain };
|
||||||
let string = unix.get_user_name(uid).unwrap_or(uid.to_str());
|
let string = unix.get_user_name(uid).unwrap_or(uid.to_string());
|
||||||
style.paint(string.as_slice())
|
style.paint(string.as_slice())
|
||||||
},
|
},
|
||||||
Group => {
|
Group => {
|
||||||
let gid = self.stat.unstable.gid as u32;
|
let gid = self.stat.unstable.gid as u32;
|
||||||
unix.load_group(gid);
|
unix.load_group(gid);
|
||||||
let name = unix.get_group_name(gid).unwrap_or(gid.to_str());
|
let name = unix.get_group_name(gid).unwrap_or(gid.to_string());
|
||||||
let style = if unix.is_group_member(gid) { Yellow.normal() } else { Plain };
|
let style = if unix.is_group_member(gid) { Yellow.normal() } else { Plain };
|
||||||
style.paint(name.as_slice())
|
style.paint(name.as_slice())
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user