diff options
author | Ben S <ogham@bsago.me> | 2015-05-11 23:28:01 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-05-11 23:28:01 +0100 |
commit | dc6599b1b344370b851b9e9ca32ef62ba7d9a1c8 (patch) | |
tree | 47f1277d34621b1e93f38d4e487ed6ad92f9540e /src/output/lines.rs | |
parent | bc844a3843cdc56630cf87c8f3ba1f2d6aa4152f (diff) |
Turn File into simply a data source
And move all the rendering, ansi_term, colourful stuff into the output modules, which is the only place they should be used!
Diffstat (limited to 'src/output/lines.rs')
-rw-r--r-- | src/output/lines.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/lines.rs b/src/output/lines.rs index b61494f..bd1fcdc 100644 --- a/src/output/lines.rs +++ b/src/output/lines.rs @@ -1,5 +1,6 @@ use colours::Colours; use file::File; +use super::filename; #[derive(Clone, Copy, Debug, PartialEq)] pub struct Lines { @@ -10,7 +11,7 @@ pub struct Lines { impl Lines { pub fn view(&self, files: &[File]) { for file in files { - println!("{}", file.file_name_view(&self.colours)); + println!("{}", filename(file, &self.colours)); } } } |