summaryrefslogtreecommitdiffstats
path: root/src/column.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-02-05 14:39:56 +0000
committerBen S <ogham@bsago.me>2015-02-05 14:39:56 +0000
commit42ae7b3d332fa46df3bb27f474f6b91a2d399d62 (patch)
treeb046d4d87a08cf7080224bf05617728e2efc7769 /src/column.rs
parent5f2acf570c99c8e5fad5b7fabacd8c3d9b4c5c43 (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/column.rs')
-rw-r--r--src/column.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/column.rs b/src/column.rs
index 74d449d..030570a 100644
--- a/src/column.rs
+++ b/src/column.rs
@@ -2,6 +2,8 @@ use std::iter::repeat;
use ansi_term::Style;
+use options::SizeFormat;
+
#[derive(PartialEq, Debug, Copy)]
pub enum Column {
Permissions,
@@ -15,13 +17,6 @@ pub enum Column {
GitStatus,
}
-#[derive(PartialEq, Debug, Copy)]
-pub enum SizeFormat {
- DecimalBytes,
- BinaryBytes,
- JustBytes,
-}
-
/// Each column can pick its own **Alignment**. Usually, numbers are
/// right-aligned, and text is left-aligned.
#[derive(Copy)]