Skip to content

Commit

Permalink
cargo fix --edition-idioms
Browse files Browse the repository at this point in the history
  • Loading branch information
brianm committed Jan 10, 2019
1 parent 718f1de commit 58a4b12
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,24 @@ fn run() -> Result<()> {
.long("input")
.takes_value(true)
.help("input file to use if not receiving on stdin"),
).arg(
)
.arg(
Arg::with_name("DELIMITER")
.short("d")
.long("delimiter")
.takes_value(true)
.help("delimiter between output values, default is tab"),
).arg(
)
.arg(
Arg::with_name("POINTER")
.required(true)
.multiple(true)
.help("JSON Pointer expressions to match on input"),
).get_matches();
)
.get_matches();

let input = matches.value_of("INPUT").unwrap_or("-");
let rdr: Box<io::Read> = match input {
let rdr: Box<dyn io::Read> = match input {
"-" => Box::new(io::stdin()),
_ => Box::new(fs::File::open(input)?),
};
Expand Down

0 comments on commit 58a4b12

Please sign in to comment.