Skip to content

Commit

Permalink
config reading: use same_file for suppressing "both files" warning (fmt)
Browse files Browse the repository at this point in the history
Apply deferred indentation changes.  Whitespace change only.
  • Loading branch information
ijackson committed Apr 24, 2024
1 parent 23440c0 commit 2f16838
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/cargo/util/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1542,11 +1542,11 @@ impl GlobalContext {
if let Ok(possible_with_extension_handle) =
same_file::Handle::from_path(&possible_with_extension)
{
// We don't want to print a warning if the version
// without the extension is just a symlink to the version
// WITH an extension, which people may want to do to
// support multiple Cargo versions at once and not
// get a warning.
// We don't want to print a warning if the version
// without the extension is just a symlink to the version
// WITH an extension, which people may want to do to
// support multiple Cargo versions at once and not
// get a warning.
if possible_handle != possible_with_extension_handle {
self.shell().warn(format!(
"both `{}` and `{}` exist. Using `{}`",
Expand All @@ -1556,13 +1556,13 @@ impl GlobalContext {
))?;
}
} else {
self.shell().warn(format!(
"`{}` is deprecated in favor of `{filename_without_extension}.toml`",
possible.display(),
))?;
self.shell().note(
format!("if you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
)?;
self.shell().warn(format!(
"`{}` is deprecated in favor of `{filename_without_extension}.toml`",
possible.display(),
))?;
self.shell().note(
format!("if you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
)?;
}
}

Expand Down

0 comments on commit 2f16838

Please sign in to comment.