mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
parent
62759ffea7
commit
341b12874d
2 changed files with 5 additions and 2 deletions
|
@ -190,9 +190,10 @@ fn verify_app() {
|
|||
```
|
||||
|
||||
**From structopt 0.3.25**
|
||||
<a name="migrate-structopt"></a>
|
||||
|
||||
1. Add CLI tests, `-h` and `--help` output at a minimum (recommendation: [trycmd](https://docs.rs/trycmd/) for snapshot testing)
|
||||
2. Update your dependency, adding the `derive` feature flag
|
||||
2. Replace your dependency from `structopt = "..."` to `clap = { version = "3.0", features = "derive" }`
|
||||
1. *If you use `no-default-features`:* add the `std` feature
|
||||
3. Resolve compiler errors, including
|
||||
1. Update your `use` statements from `structopt` and `structopt::clap` to `clap`
|
||||
|
|
|
@ -33,7 +33,9 @@ The benefits of integrating `structopt` and `clap` are:
|
|||
derives in mind and easier to change `clap` in response to `structopt` bugs.
|
||||
- Clearer endorsement of `structopt`
|
||||
|
||||
For more details on what has changed and how to migrate, see the [CHANGELOG](../CHANGELOG.md)
|
||||
See also
|
||||
- [`clap` v3 CHANGELOG](../CHANGELOG.md#300---2021-12-31)
|
||||
- [`structopt` migration guide](../CHANGELOG.md#migrate-structopt)
|
||||
|
||||
#### What are some reasons to use `clap`? (The Pitch)
|
||||
|
||||
|
|
Loading…
Reference in a new issue