-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8830771
commit b57dde1
Showing
74 changed files
with
142 additions
and
14 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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Option<Option<T>> type is meaningless for positional argument | ||
--> $DIR/opt_opt_nonpositional.rs:14:8 | ||
| | ||
14 | n: Option<Option<u32>>, | ||
| ^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Option<Vec<T>> type is meaningless for positional argument | ||
--> $DIR/opt_vec_nonpositional.rs:14:8 | ||
| | ||
14 | n: Option<Vec<u32>>, | ||
| ^^^^^^^^^^^^^^^^ |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Option<Option<T>> type is not allowed for subcommand | ||
--> $DIR/subcommand_opt_opt.rs:18:10 | ||
| | ||
18 | cmd: Option<Option<Command>>, | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Option<Vec<T>> type is not allowed for subcommand | ||
--> $DIR/subcommand_opt_vec.rs:18:10 | ||
| | ||
18 | cmd: Option<Vec<Command>>, | ||
| ^^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
use structopt::StructOpt; | ||
|
||
#[derive(StructOpt, Debug)] | ||
#[structopt(name = "basic")] | ||
struct Opt { | ||
n: Option<Option<u32>>, | ||
} | ||
|
||
fn main() {} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
use structopt::StructOpt; | ||
|
||
#[derive(StructOpt, Debug)] | ||
#[structopt(name = "basic")] | ||
struct Opt { | ||
n: Option<Vec<u32>>, | ||
} | ||
|
||
fn main() {} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
use structopt::StructOpt; | ||
|
||
#[derive(StructOpt)] | ||
#[structopt(name = "make-cookie")] | ||
struct MakeCookie { | ||
#[structopt(short)] | ||
s: String, | ||
|
||
#[structopt(subcommand)] | ||
cmd: Option<Option<Command>>, | ||
} | ||
|
||
#[derive(StructOpt)] | ||
enum Command { | ||
#[structopt(name = "pound")] | ||
/// Pound acorns into flour for cookie dough. | ||
Pound { acorns: u32 }, | ||
|
||
Sparkle { | ||
#[structopt(short)] | ||
color: String, | ||
}, | ||
} | ||
|
||
fn main() {} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
use structopt::StructOpt; | ||
|
||
#[derive(StructOpt)] | ||
#[structopt(name = "make-cookie")] | ||
struct MakeCookie { | ||
#[structopt(short)] | ||
s: String, | ||
|
||
#[structopt(subcommand)] | ||
cmd: Option<Vec<Command>>, | ||
} | ||
|
||
#[derive(StructOpt)] | ||
enum Command { | ||
#[structopt(name = "pound")] | ||
/// Pound acorns into flour for cookie dough. | ||
Pound { acorns: u32 }, | ||
|
||
Sparkle { | ||
#[structopt(short)] | ||
color: String, | ||
}, | ||
} | ||
|
||
fn main() {} |
File renamed without changes.