mirror of
https://github.com/eza-community/eza
synced 2024-09-30 05:06:30 +00:00
Upgrade to latest Rust nightly
This commit is contained in:
parent
d76fee7328
commit
818fc615a8
8
exa.rs
8
exa.rs
|
@ -16,8 +16,10 @@ struct Options {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let args = os::args();
|
||||
let program = args[0].as_slice();
|
||||
let args: Vec<StrBuf> = os::args().iter()
|
||||
.map(|x| x.to_strbuf())
|
||||
.collect();
|
||||
|
||||
let opts = ~[
|
||||
getopts::optflag("a", "all", "show dot-files")
|
||||
];
|
||||
|
@ -32,7 +34,7 @@ fn main() {
|
|||
};
|
||||
|
||||
let strs = if matches.free.is_empty() {
|
||||
vec!("./".to_owned())
|
||||
vec!("./".to_strbuf())
|
||||
}
|
||||
else {
|
||||
matches.free.clone()
|
||||
|
|
6
file.rs
6
file.rs
|
@ -74,7 +74,7 @@ impl<'a> File<'a> {
|
|||
fn file_colour(&self) -> Style {
|
||||
if self.stat.kind == io::TypeDirectory {
|
||||
Blue.normal()
|
||||
} else if self.stat.perm & io::UserExecute == io::UserExecute {
|
||||
} else if self.stat.perm.contains(io::UserExecute) {
|
||||
Green.normal()
|
||||
} else if self.name.ends_with("~") {
|
||||
Black.bold()
|
||||
|
@ -100,8 +100,8 @@ impl<'a> File<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn bit(bits: u32, bit: u32, other: &'static str, style: Style) -> ~str {
|
||||
if bits & bit == bit {
|
||||
fn bit(bits: io::FilePermission, bit: io::FilePermission, other: &'static str, style: Style) -> ~str {
|
||||
if bits.contains(bit) {
|
||||
style.paint(other.to_owned())
|
||||
} else {
|
||||
Black.bold().paint("-".to_owned())
|
||||
|
|
Loading…
Reference in a new issue