diff --git a/src/exa.rs b/src/exa.rs index ccc8b51..035c234 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 2bafdd1..21105da 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