diff --git a/Cargo.lock b/Cargo.lock index f970f44584780839c1d6a84217e4def69afc549e..63158fe19187df4e4eba7603b28ecb729249e32d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ name = "exa" version = "0.4.0" dependencies = [ - "ansi_term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "datetime 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.5.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0e0fd8a46e20aaed2d3ac6f1dd372e9d4f479e77..371e8795f4f73696972bca298587b5c2b479ef3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "ogham@bsago.me" ] name = "exa" [dependencies] -ansi_term = "0.5.0" +ansi_term = "0.7.0" bitflags = "0.1" datetime = "0.4.1" getopts = "0.2.1" diff --git a/src/output/grid.rs b/src/output/grid.rs index 0fd0af407fe72b43991a84713e0e1d5c1a245f85..13d2f8dae8b5a383ba7750b30f04f2615c9cfc46 100644 --- a/src/output/grid.rs +++ b/src/output/grid.rs @@ -26,7 +26,7 @@ impl Grid { for file in files.iter() { grid.add(grid::Cell { - contents: file_colour(&self.colours, file).paint(&file.name).to_string(), + contents: file_colour(&self.colours, file).paint(&*file.name).to_string(), width: file.file_name_width(), }); } @@ -37,7 +37,7 @@ impl Grid { else { // File names too long for a grid - drop down to just listing them! for file in files.iter() { - println!("{}", file_colour(&self.colours, file).paint(&file.name)); + println!("{}", file_colour(&self.colours, file).paint(&*file.name)); } } } diff --git a/src/output/mod.rs b/src/output/mod.rs index 42058521ef92764947610c410e332754f57ff4f5..5a3fb31b51d0347b6c310493ca18f8d680e51b84 100644 --- a/src/output/mod.rs +++ b/src/output/mod.rs @@ -20,21 +20,21 @@ pub fn filename(file: &File, colours: &Colours, links: bool) -> String { } else { let style = file_colour(colours, file); - style.paint(&file.name).to_string() + style.paint(&*file.name).to_string() } } fn symlink_filename(file: &File, colours: &Colours) -> String { match file.link_target() { Ok(target) => format!("{} {} {}", - file_colour(colours, file).paint(&file.name), + file_colour(colours, file).paint(&*file.name), colours.punctuation.paint("->"), - ANSIStrings(&[ colours.symlink_path.paint(&target.path_prefix()), - file_colour(colours, &target).paint(&target.name) ])), + ANSIStrings(&[ colours.symlink_path.paint(target.path_prefix()), + file_colour(colours, &target).paint(target.name) ])), Err(filename) => format!("{} {} {}", - file_colour(colours, file).paint(&file.name), + file_colour(colours, file).paint(&*file.name), colours.broken_arrow.paint("->"), - colours.broken_filename.paint(&filename)), + colours.broken_filename.paint(filename)), } }