diff --git a/src/exa.rs b/src/exa.rs index ccc8b5151c3fba923c603848d36788c138ce4cb6..035c234652e00562388c7b40422b1c30501db9e1 100644 --- a/src/exa.rs +++ b/src/exa.rs @@ -153,7 +153,7 @@ fn details_view(options: &Options, columns: &Vec, files: Vec<&File>) { } if num == columns.len() - 1 { - print!("{}", row.get(num)); + print!("{}", row[num]); } else { let padding = column_widths[num] - field_widths[num]; diff --git a/src/file.rs b/src/file.rs index 2bafdd12efde0f34ed163118af5e49f16f266b1e..21105daef2676320c86c201e6054fe1e0d342e54 100644 --- a/src/file.rs +++ b/src/file.rs @@ -32,7 +32,7 @@ pub struct File<'a> { impl<'a> File<'a> { pub fn from_path(path: &'a Path, parent: &'a Dir) -> IoResult> { let v = path.filename().unwrap(); // fails if / or . or .. - let filename = String::from_utf8(v.to_vec()).to_string(); + let filename = String::from_utf8(v.to_vec()).unwrap(); // Use lstat here instead of file.stat(), as it doesn't follow // symbolic links. Otherwise, the stat() call will fail if it