Upgrade to latest Rust nightly

This commit is contained in:
Ben S 2014-05-22 00:16:05 +01:00
parent d76fee7328
commit 818fc615a8
2 changed files with 8 additions and 6 deletions

8
exa.rs
View file

@ -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()

View file

@ -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())