Skip to content

Commit

Permalink
Correct README syntax for bool flag (#3346)
Browse files Browse the repository at this point in the history
The proper syntax for the attribute is "parse" not "parser".
  • Loading branch information
mikehoyle authored Jan 26, 2022
1 parent 5ccffb0 commit 50b3d29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/derive_ref/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ In addition to the raw attributes, the following magic attributes are supported:

| Type | Effect | Implies |
|---------------------|--------------------------------------|------------------------------------------------------------------|
| `bool` | flag | `#[clap(parser(from_flag))]` |
| `bool` | flag | `#[clap(parse(from_flag))]` |
| `Option<T>` | optional argument | `.takes_value(true).required(false)` |
| `Option<Option<T>>` | optional value for optional argument | `.takes_value(true).required(false).min_values(0).max_values(1)` |
| `T` | required argument | `.takes_value(true).required(!has_default)` |
Expand Down

0 comments on commit 50b3d29

Please sign in to comment.