-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Examples): adds better usage examples instead of having unused v…
…ariables
- Loading branch information
Showing
6 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ extern crate clap; | |
|
||
use clap::{App}; | ||
|
||
#[allow(unused_variables)] | ||
fn main() { | ||
// Apps describe the top level application | ||
// | ||
|
@@ -19,11 +18,11 @@ fn main() { | |
// Once all options have been set, call .get_matches() in order to start the parsing and find all valid | ||
// command line arguments that supplied by the user at runtime. The name given to new() will be displayed | ||
// when the version or help flags are used. | ||
let matches = App::new("MyApp") | ||
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.about("Does awesome things") | ||
.get_matches(); | ||
App::new("MyApp") | ||
.version("1.0") | ||
.author("Kevin K. <[email protected]>") | ||
.about("Does awesome things") | ||
.get_matches(); | ||
|
||
// This example doesn't do much, but it *does* give automatic -h, --help, -V, and --version functionality ;) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters