diff options
author | Ben S <ogham@bsago.me> | 2015-02-05 14:39:56 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-02-05 14:39:56 +0000 |
commit | 42ae7b3d332fa46df3bb27f474f6b91a2d399d62 (patch) | |
tree | b046d4d87a08cf7080224bf05617728e2efc7769 /src/output/lines.rs | |
parent | 5f2acf570c99c8e5fad5b7fabacd8c3d9b4c5c43 (diff) |
Refactor the code after tree view changes
- Turn the views and main program loop into structs, rather than just as one gigantic function
- Separate views into their own files
The addition of the git column and the tree view meant that a lot of functions now just took extra arguments that didn't seem to fit. For example, it didn't really work to have only one 'view' method that printed out everything, as the different view options now all take different parameters.
Diffstat (limited to 'src/output/lines.rs')
-rw-r--r-- | src/output/lines.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/output/lines.rs b/src/output/lines.rs new file mode 100644 index 0000000..6649c29 --- /dev/null +++ b/src/output/lines.rs @@ -0,0 +1,8 @@ +use file::File; + +/// The lines view literally just displays each file, line-by-line. +pub fn lines_view(files: &[File]) { + for file in files { + println!("{}", file.file_name_view()); + } +} |