Skip to content

Commit

Permalink
Rollup merge of rust-lang#35137 - jongiddy:explicit-wildcard, r=steve…
Browse files Browse the repository at this point in the history
…klabnik

Provide more explicit example of wildcard version in guessing game doc.

Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
  • Loading branch information
GuillaumeGomez authored Aug 5, 2016
2 parents 6375add + b77b9b7 commit efff1d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/book/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ numbers. A bare number like above is actually shorthand for `^0.3.0`,
meaning "anything compatible with 0.3.0".
If we wanted to use only `0.3.0` exactly, we could say `rand="=0.3.0"`
(note the two equal signs).
And if we wanted to use the latest version we could use `*`.
And if we wanted to use the latest version we could use `rand="*"`.
We could also use a range of versions.
[Cargo’s documentation][cargodoc] contains more details.

Expand Down

0 comments on commit efff1d3

Please sign in to comment.