]> git.proxmox.com Git - cargo.git/commitdiff
Further explain unused_patches.
authorEric Huss <eric@huss.org>
Mon, 29 Jul 2019 17:30:53 +0000 (10:30 -0700)
committerEric Huss <eric@huss.org>
Mon, 29 Jul 2019 17:30:53 +0000 (10:30 -0700)
src/cargo/core/resolver/resolve.rs

index 17eccb5a981e65afb08998451a4bcaee7e240da3..9ced48f4d677b44c748d411cada1c37bd65e2e06 100644 (file)
@@ -42,9 +42,10 @@ pub struct Resolve {
     /// forwards compatibility.
     metadata: Metadata,
     /// `[patch]` entries that did not match anything, preserved in
-    /// `Cargo.lock` as the `[[patch.unused]]` table array.
-    /// TODO: *Why* is this kept in `Cargo.lock`? Removing it doesn't seem to
-    /// affect anything.
+    /// `Cargo.lock` as the `[[patch.unused]]` table array. Tracking unused
+    /// patches helps prevent Cargo from being forced to re-update the
+    /// registry every time it runs, and keeps the resolve in a locked state
+    /// so it doesn't re-resolve the unused entries.
     unused_patches: Vec<PackageId>,
     /// A map from packages to a set of their public dependencies
     public_dependencies: HashMap<PackageId, HashSet<PackageId>>,