From 91334d601c6ef38b4cdbc3d276d927ce1696cffe Mon Sep 17 00:00:00 2001 From: Benjamin Sago Date: Mon, 2 Oct 2017 20:13:30 +0100 Subject: [PATCH] Use colour traits when possible --- src/output/details.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output/details.rs b/src/output/details.rs index 9b1a14b..c439507 100644 --- a/src/output/details.rs +++ b/src/output/details.rs @@ -327,12 +327,14 @@ impl<'a> Render<'a> { } fn render_error(&self, error: &IOError, tree: TreeParams, path: Option) -> 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 } }