提交 818fc615 编写于 作者: B Ben S

Upgrade to latest Rust nightly

上级 d76fee73
......@@ -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()
......
......@@ -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())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册