Skip to content

Commit

Permalink
It's hardly worth giving Exa its own constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ogham committed Sep 3, 2015
1 parent 83f05ff commit a14f1d8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit a14f1d8

Please sign in to comment.