@@ -46,9 +46,11 @@ pub struct Resolve {
46
46
summaries : HashMap < PackageId , Summary > ,
47
47
}
48
48
49
- /// A version to indicate how a `Cargo.lock` should be serialized. Currently
50
- /// V2 is the default when creating a new lockfile. If a V1 lockfile already
51
- /// exists, it will stay as V1.
49
+ /// A version to indicate how a `Cargo.lock` should be serialized.
50
+ ///
51
+ /// When creating a new lockfile, the default version defined in
52
+ /// [`ResolveVersion::default`] is used.
53
+ /// If an old version of lockfile already exists, it will stay as-is.
52
54
///
53
55
/// It's theorized that we can add more here over time to track larger changes
54
56
/// to the `Cargo.lock` format, but we've yet to see how that strategy pans out.
@@ -59,12 +61,13 @@ pub enum ResolveVersion {
59
61
/// A more compact format, more amenable to avoiding source-control merge
60
62
/// conflicts. The `dependencies` arrays are compressed and checksums are
61
63
/// listed inline. Introduced in 2019 in version 1.38. New lockfiles use
62
- /// V2 by default starting in 1.41.
64
+ /// V2 by default from 1.41 to 1.52 .
63
65
V2 ,
64
66
/// A format that explicitly lists a `version` at the top of the file as
65
67
/// well as changing how git dependencies are encoded. Dependencies with
66
68
/// `branch = "master"` are no longer encoded the same way as those without
67
- /// branch specifiers.
69
+ /// branch specifiers. Introduced in 2020 in version 1.47. New lockfiles use
70
+ /// V3 by default staring in 1.53.
68
71
V3 ,
69
72
}
70
73
@@ -395,7 +398,7 @@ impl fmt::Debug for Resolve {
395
398
impl Default for ResolveVersion {
396
399
/// The default way to encode new or updated `Cargo.lock` files.
397
400
///
398
- /// It's important that if a new version of `ResolveVersion` is added that
401
+ /// It's important that if a new version of [ `ResolveVersion`] is added that
399
402
/// this is not updated until *at least* the support for the version is in
400
403
/// the stable release of Rust.
401
404
///
0 commit comments