Skip to content

Commit

Permalink
refactor: make clear SourceId serialization will change in v4
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Jan 3, 2024
1 parent 67d0505 commit 5245a73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cargo/core/source_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,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) {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,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) {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/toml_mut/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,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) {
Expand Down

0 comments on commit 5245a73

Please sign in to comment.