Use colour traits when possible

This commit is contained in:
Benjamin Sago 2017-10-02 20:13:30 +01:00
parent 59d9e90f20
commit 91334d601c

View File

@ -327,12 +327,14 @@ impl<'a> Render<'a> {
}
fn render_error(&self, error: &IOError, tree: TreeParams, path: Option<PathBuf>) -> Row {
use output::file_name::Colours;
let error_message = match path {
Some(path) => format!("<{}: {}>", path.display(), error),
None => format!("<{}>", error),
};
let name = TextCell::paint(self.colours.broken_arrow, error_message);
let name = TextCell::paint(self.colours.broken_arrow(), error_message);
Row { cells: None, name, tree }
}