mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
Fix minor typos in 10_default_values.rs
This commit is contained in:
parent
52814b893c
commit
a637d96d82
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
use clap::{App, Arg};
|
use clap::{App, Arg};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// There are two ways in which to get a default value, one is to use claps Arg::default_value
|
// There are two ways in which to get a default value, one is to use clap's Arg::default_value
|
||||||
// method, and the other is to use Rust's built in Option::unwrap_or method.
|
// method, and the other is to use Rust's built in Option::unwrap_or method.
|
||||||
//
|
//
|
||||||
// I'll demo both here.
|
// I'll demo both here.
|
||||||
|
@ -30,7 +30,7 @@ fn main() {
|
||||||
)
|
)
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
// It's safe to call unwrap because the value with either be what the user input at runtime
|
// It's safe to call unwrap because the value will either be what the user input at runtime
|
||||||
// or "input.txt"
|
// or "input.txt"
|
||||||
let input = matches.value_of("INPUT").unwrap();
|
let input = matches.value_of("INPUT").unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue