summaryrefslogtreecommitdiffstats
path: root/src/output/details.rs
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2015-12-17 10:27:44 +0800
committerBenjamin Sago <ogham@bsago.me>2015-12-17 10:27:44 +0800
commit88653a00eb0512be43466e697886ee4902a99920 (patch)
tree63ed93405d563be5b4373ddc75d7a19ba28b6ae8 /src/output/details.rs
parent4c2bf2f2e6231c14a8aa44cb49c828034c342a69 (diff)
Remove dependency between file and output mods
By removing the `File#file_name_width` method, we can make the file module have no dependency on the output module -- in other words, the model (file) and the view (output) are now separate again!
Diffstat (limited to 'src/output/details.rs')
-rw-r--r--src/output/details.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/output/details.rs b/src/output/details.rs
index 4f224bd..edfc2a6 100644
--- a/src/output/details.rs
+++ b/src/output/details.rs
@@ -281,7 +281,7 @@ impl Details {
let mut errors = egg.errors;
let name = TextCell {
- length: egg.file.file_name_width(),
+ length: DisplayWidth::from(&*egg.file.name),
contents: filename(egg.file, &self.colours, true),
};
@@ -461,7 +461,7 @@ impl<U> Table<U> where U: Users {
pub fn filename_cell(&self, file: File, links: bool) -> TextCell {
TextCell {
- length: file.file_name_width(),
+ length: DisplayWidth::from(&*file.name),
contents: filename(file, &self.colours, links),
}
}