Skip to content

Commit b77b9b7

Browse files
committed
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.
1 parent 1225e12 commit b77b9b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/book/guessing-game.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ numbers. A bare number like above is actually shorthand for `^0.3.0`,
365365
meaning "anything compatible with 0.3.0".
366366
If we wanted to use only `0.3.0` exactly, we could say `rand="=0.3.0"`
367367
(note the two equal signs).
368-
And if we wanted to use the latest version we could use `*`.
368+
And if we wanted to use the latest version we could use `rand="*"`.
369369
We could also use a range of versions.
370370
[Cargo’s documentation][cargodoc] contains more details.
371371

0 commit comments

Comments
 (0)