Skip to content

Commit bc2be89

Browse files
committed
docs(example): Remove builder references
Fixes #3489
1 parent 2f2b1c2 commit bc2be89

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/tutorial_derive/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ In addition to this tutorial, see the [derive reference](../derive_ref/README.md
6666

6767
## Configuring the Parser
6868

69-
You use the `Command` the start building a parser.
69+
You use derive `Parser` the start building a parser.
7070

7171
[Example:](02_apps.rs)
7272
```console
@@ -89,7 +89,7 @@ MyApp 1.0
8989

9090
```
9191

92-
You can use `command!()` to fill these fields in from your `Cargo.toml` file.
92+
You can use `#[clap(author, version, about)]` attribute defaults to fill these fields in from your `Cargo.toml` file.
9393

9494
[Example:](02_crate.rs)
9595
```console
@@ -111,7 +111,7 @@ clap [..]
111111

112112
```
113113

114-
You can use `Command` methods to change the application level behavior of clap.
114+
You can use derive attributes to change the application level behavior of clap.
115115

116116
[Example:](02_app_settings.rs)
117117
```console
@@ -266,7 +266,7 @@ name: Some("bob")
266266

267267
### Subcommands
268268

269-
Subcommands are defined as `Command`s that get added via `Command::subcommand`. Each
269+
Subcommands are derived with `Subcommand` that get added via `#[clap(subcommand)]` attribute. Each
270270
instance of a Subcommand can have its own version, author(s), Args, and even its own
271271
subcommands.
272272

@@ -326,7 +326,7 @@ SUBCOMMANDS:
326326

327327
```
328328

329-
Because we set `Command::propagate_version`:
329+
Because we added `#[clap(propagate_version = true)]`:
330330
```console
331331
$ 03_04_subcommands_derive --version
332332
clap [..]
@@ -339,8 +339,8 @@ $ 03_04_subcommands_derive add --version
339339
### Defaults
340340

341341
We've previously showed that arguments can be `required` or optional. When
342-
optional, you work with a `Option` and can `unwrap_or`. Alternatively, you can
343-
set `Arg::default_value`.
342+
optional, you work with an `Option` and can `unwrap_or`. Alternatively, you can
343+
set `#[clap(default_value_t)]`.
344344

345345
[Example:](03_05_default_values.rs)
346346
```console

0 commit comments

Comments
 (0)