Skip to content

Commit

Permalink
Uniq: FIXUP It builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhav Yenamandra committed Oct 11, 2019
1 parent 4da17da commit b6c19d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions uniq/src/execution_options.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mod execution_options {

use std::process;

pub enum Counters {
Expand Down Expand Up @@ -35,7 +33,7 @@ fn parse_num_or_panic(num_s: &str, message: String) -> u32 {
/// # Arguments
/// * `matches` - A `clap::ArgMatches` object to transform into a struct
/// representing the parameters of execution
pub fn read_clap_matches(arg_matches: &clap::ArgMatches) -> ExecutionOptions {
pub fn read_clap_matches(arg_matches: clap::ArgMatches) -> ExecutionOptions {
let read_stdin = !arg_matches.is_present("input_file");
let write_stdout = !arg_matches.is_present("output_file");

Expand Down Expand Up @@ -63,8 +61,8 @@ pub fn read_clap_matches(arg_matches: &clap::ArgMatches) -> ExecutionOptions {
} else {
0
},
read_stdin: read_stdin,
write_stdout: write_stdout,
read_stdin,
write_stdout,
input_file_path: if read_stdin {
None
} else {
Expand All @@ -88,4 +86,3 @@ pub fn read_clap_matches(arg_matches: &clap::ArgMatches) -> ExecutionOptions {
},
}
}
}
2 changes: 1 addition & 1 deletion uniq/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ mod execution_options;

fn main() {
let yaml = load_yaml!("uniq.yml");
let _opts = read_clap_matches(App::from_yaml(yaml).get_matches());
let _opts = execution_options::read_clap_matches(App::from_yaml(yaml).get_matches());
}

0 comments on commit b6c19d0

Please sign in to comment.