@@ -21,14 +21,16 @@ time = "0.1.12"
21
21
22
22
The string ` "0.1.12" ` is a version requirement. Although it looks like a
23
23
specific * version* of the ` time ` crate, it actually specifies a * range* of
24
- versions and allows SemVer compatible updates. An update is allowed if the new
24
+ versions and allows [ SemVer] compatible updates. An update is allowed if the new
25
25
version number does not modify the left-most non-zero digit in the major, minor,
26
26
patch grouping. In this case, if we ran ` cargo update -p time ` , cargo should
27
27
update us to version ` 0.1.13 ` if it is the latest ` 0.1.z ` release, but would not
28
28
update us to ` 0.2.0 ` . If instead we had specified the version string as ` 1.0 ` ,
29
29
cargo should update to ` 1.1 ` if it is the latest ` 1.y ` release, but not ` 2.0 ` .
30
30
The version ` 0.0.x ` is not considered compatible with any other version.
31
31
32
+ [ SemVer ] : https://semver.org
33
+
32
34
Here are some more examples of version requirements and the versions that would
33
35
be allowed with them:
34
36
@@ -48,8 +50,8 @@ versions before 1.0.0. While SemVer says there is no compatibility before
48
50
1.0.0, Cargo considers ` 0.x.y ` to be compatible with ` 0.x.z ` , where ` y ≥ z `
49
51
and ` x > 0 ` .
50
52
51
- It is possible to further tweak the logic for selecting compatible version using
52
- special operators, though it shouldn't be necessary most of the time.
53
+ It is possible to further tweak the logic for selecting compatible versions
54
+ using special operators, though it shouldn't be necessary most of the time.
53
55
54
56
### Caret requirements
55
57
0 commit comments