From f8a47fa6b34c636ab9d670898e9eff182ef1ab2d Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 19 Oct 2023 14:48:45 -0400 Subject: [PATCH] refactor: make clear SourceId serialization will change in v4 --- src/cargo/core/source_id.rs | 2 +- src/cargo/sources/git/source.rs | 2 +- src/cargo/util/toml_mut/dependency.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/source_id.rs b/src/cargo/core/source_id.rs index 3b1cad94211..35acee8fdd2 100644 --- a/src/cargo/core/source_id.rs +++ b/src/cargo/core/source_id.rs @@ -656,7 +656,7 @@ impl fmt::Display for SourceId { // Don't replace the URL display for git references, // because those are kind of expected to be URLs. write!(f, "{}", self.inner.url)?; - // TODO(-Znext-lockfile-bump): set it to true when stabilizing + // TODO(-Znext-lockfile-bump): set it to true when the default is // lockfile v4, because we want Source ID serialization to be // consistent with lockfile. if let Some(pretty) = reference.pretty_ref(false) { diff --git a/src/cargo/sources/git/source.rs b/src/cargo/sources/git/source.rs index 7d303f0c25f..dade425e5c9 100644 --- a/src/cargo/sources/git/source.rs +++ b/src/cargo/sources/git/source.rs @@ -188,7 +188,7 @@ impl<'cfg> Debug for GitSource<'cfg> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { write!(f, "git repo at {}", self.remote.url())?; - // TODO(-Znext-lockfile-bump): set it to true when stabilizing + // TODO(-Znext-lockfile-bump): set it to true when the default is // lockfile v4, because we want Source ID serialization to be // consistent with lockfile. match self.manifest_reference.pretty_ref(false) { diff --git a/src/cargo/util/toml_mut/dependency.rs b/src/cargo/util/toml_mut/dependency.rs index 6ffd214b473..867d43d4780 100644 --- a/src/cargo/util/toml_mut/dependency.rs +++ b/src/cargo/util/toml_mut/dependency.rs @@ -918,7 +918,7 @@ impl std::fmt::Display for GitSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let git_ref = self.git_ref(); - // TODO(-Znext-lockfile-bump): set it to true when stabilizing + // TODO(-Znext-lockfile-bump): set it to true when the default is // lockfile v4, because we want Source ID serialization to be // consistent with lockfile. if let Some(pretty_ref) = git_ref.pretty_ref(false) {