mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
docs: changes the demo version to 2.28 to stay in sync
This commit is contained in:
parent
9ef3d82bd0
commit
ce6ca492c7
2 changed files with 10 additions and 10 deletions
14
README.md
14
README.md
|
@ -296,7 +296,7 @@ subcommands:
|
||||||
|
|
||||||
Since this feature requires additional dependencies that not everyone may want, it is *not* compiled in by default and we need to enable a feature flag in Cargo.toml:
|
Since this feature requires additional dependencies that not everyone may want, it is *not* compiled in by default and we need to enable a feature flag in Cargo.toml:
|
||||||
|
|
||||||
Simply change your `clap = "2.27"` to `clap = {version = "2.27", features = ["yaml"]}`.
|
Simply change your `clap = "2.28"` to `clap = {version = "2.87", features = ["yaml"]}`.
|
||||||
|
|
||||||
Finally we create our `main.rs` file just like we would have with the previous two examples:
|
Finally we create our `main.rs` file just like we would have with the previous two examples:
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ For full usage, add `clap` as a dependency in your `Cargo.toml` () to use from c
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "~2.27"
|
clap = "~2.28"
|
||||||
```
|
```
|
||||||
|
|
||||||
(**note**: If you are concerned with supporting a minimum version of Rust that is *older* than the current stable Rust minus 2 stable releases, it's recommended to use the `~major.minor.patch` style versions in your `Cargo.toml` which will only update the patch version automatically. For more information see the [Compatibility Policy](#compatibility-policy))
|
(**note**: If you are concerned with supporting a minimum version of Rust that is *older* than the current stable Rust minus 2 stable releases, it's recommended to use the `~major.minor.patch` style versions in your `Cargo.toml` which will only update the patch version automatically. For more information see the [Compatibility Policy](#compatibility-policy))
|
||||||
|
@ -440,7 +440,7 @@ To disable these, add this to your `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "2.27"
|
version = "2.28"
|
||||||
default-features = false
|
default-features = false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ You can also selectively enable only the features you'd like to include, by addi
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "2.27"
|
version = "2.28"
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
||||||
# Cherry-pick the features you'd like to use
|
# Cherry-pick the features you'd like to use
|
||||||
|
@ -496,7 +496,7 @@ In order to keep from being surprised of breaking changes, it is **highly** reco
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "~2.27"
|
clap = "~2.28"
|
||||||
```
|
```
|
||||||
|
|
||||||
This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore cannot break due to new features, or bumped minimum versions of Rust.
|
This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore cannot break due to new features, or bumped minimum versions of Rust.
|
||||||
|
@ -513,11 +513,11 @@ Right now Cargo's version resolution is pretty naive, it's just a brute-force se
|
||||||
|
|
||||||
# In one Cargo.toml
|
# In one Cargo.toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "~2.27.0"
|
clap = "~2.28.0"
|
||||||
|
|
||||||
# In another Cargo.toml
|
# In another Cargo.toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.27"
|
clap = "2.28"
|
||||||
```
|
```
|
||||||
|
|
||||||
This is inherently an unresolvable crate graph in Cargo right now. Cargo requires there's only one major version of a crate, and being in the same workspace these two crates must share a version. This is impossible in this location, though, as these version constraints cannot be met.
|
This is inherently an unresolvable crate graph in Cargo right now. Cargo requires there's only one major version of a crate, and being in the same workspace these two crates must share a version. This is impossible in this location, though, as these version constraints cannot be met.
|
||||||
|
|
|
@ -513,7 +513,7 @@
|
||||||
//! this repository for more information.
|
//! this repository for more information.
|
||||||
|
|
||||||
#![crate_type= "lib"]
|
#![crate_type= "lib"]
|
||||||
#![doc(html_root_url = "https://docs.rs/clap/2.27.2")]
|
#![doc(html_root_url = "https://docs.rs/clap/2.28.0")]
|
||||||
#![deny(
|
#![deny(
|
||||||
missing_docs,
|
missing_docs,
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
|
@ -603,7 +603,7 @@ mod derive {
|
||||||
|
|
||||||
|
|
||||||
/// @TODO @release @docs
|
/// @TODO @release @docs
|
||||||
fn try_parse_from<I, T>(argv: I) -> Result<Self, clap::Error>
|
fn try_parse_from<I, T>(argv: I) -> Result<Self, clap::Error>
|
||||||
where I: IntoIterator<Item = T>,
|
where I: IntoIterator<Item = T>,
|
||||||
T: Into<OsString> + Clone
|
T: Into<OsString> + Clone
|
||||||
{
|
{
|
||||||
|
@ -628,4 +628,4 @@ mod derive {
|
||||||
|
|
||||||
/// @TODO @release @docs
|
/// @TODO @release @docs
|
||||||
pub trait ArgEnum { }
|
pub trait ArgEnum { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue