summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-09-03 13:38:18 +0100
committerBen S <ogham@bsago.me>2015-09-03 13:38:18 +0100
commita14f1d82f07e7f0b19a696d32183470d51aef356 (patch)
treeb2d77fd1278492c90011fe4b9a65ece136521672
parent83f05ffb3c2c718d428153312b4e0392387d7e6d (diff)
It's hardly worth giving Exa its own constructor
-rw-r--r--src/main.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index fd9e527..7e540de 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -39,17 +39,11 @@ mod output;
mod term;
-#[cfg(not(test))]
struct Exa {
options: Options,
}
-#[cfg(not(test))]
impl Exa {
- fn new(options: Options) -> Exa {
- Exa { options: options }
- }
-
fn run(&mut self, args_file_names: &[String]) {
let mut files = Vec::new();
let mut dirs = Vec::new();
@@ -145,13 +139,12 @@ impl Exa {
}
-#[cfg(not(test))]
fn main() {
let args: Vec<String> = env::args().skip(1).collect();
match Options::getopts(&args) {
Ok((options, paths)) => {
- let mut exa = Exa::new(options);
+ let mut exa = Exa { options: options };
exa.run(&paths);
},
Err(e) => {