Skip to content

Commit

Permalink
docs: changes the demo version to 2.28 to stay in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Nov 28, 2017
1 parent 9ef3d82 commit ce6ca49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

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:

Expand Down Expand Up @@ -416,7 +416,7 @@ For full usage, add `clap` as a dependency in your `Cargo.toml` () to use from c

```toml
[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))
Expand All @@ -440,15 +440,15 @@ To disable these, add this to your `Cargo.toml`:

```toml
[dependencies.clap]
version = "2.27"
version = "2.28"
default-features = false
```

You can also selectively enable only the features you'd like to include, by adding:

```toml
[dependencies.clap]
version = "2.27"
version = "2.28"
default-features = false

# Cherry-pick the features you'd like to use
Expand Down Expand Up @@ -496,7 +496,7 @@ In order to keep from being surprised of breaking changes, it is **highly** reco

```toml
[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.
Expand All @@ -513,11 +513,11 @@ Right now Cargo's version resolution is pretty naive, it's just a brute-force se
# In one Cargo.toml
[dependencies]
clap = "~2.27.0"
clap = "~2.28.0"
# In another Cargo.toml
[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.
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
//! this repository for more information.

#![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(
missing_docs,
missing_debug_implementations,
Expand Down Expand Up @@ -603,7 +603,7 @@ mod derive {


/// @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>,
T: Into<OsString> + Clone
{
Expand All @@ -628,4 +628,4 @@ mod derive {

/// @TODO @release @docs
pub trait ArgEnum { }
}
}

0 comments on commit ce6ca49

Please sign in to comment.