mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-23 04:22:06 +00:00
Use colour traits when possible
This commit is contained in:
parent
59d9e90f20
commit
91334d601c
@ -327,12 +327,14 @@ impl<'a> Render<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn render_error(&self, error: &IOError, tree: TreeParams, path: Option<PathBuf>) -> Row {
|
fn render_error(&self, error: &IOError, tree: TreeParams, path: Option<PathBuf>) -> Row {
|
||||||
|
use output::file_name::Colours;
|
||||||
|
|
||||||
let error_message = match path {
|
let error_message = match path {
|
||||||
Some(path) => format!("<{}: {}>", path.display(), error),
|
Some(path) => format!("<{}: {}>", path.display(), error),
|
||||||
None => format!("<{}>", 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 }
|
Row { cells: None, name, tree }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user