Skip to content

Commit 2f16838

Browse files
committed
config reading: use same_file for suppressing "both files" warning (fmt)
Apply deferred indentation changes. Whitespace change only.
1 parent 23440c0 commit 2f16838

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/cargo/util/context/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,11 +1542,11 @@ impl GlobalContext {
15421542
if let Ok(possible_with_extension_handle) =
15431543
same_file::Handle::from_path(&possible_with_extension)
15441544
{
1545-
// We don't want to print a warning if the version
1546-
// without the extension is just a symlink to the version
1547-
// WITH an extension, which people may want to do to
1548-
// support multiple Cargo versions at once and not
1549-
// get a warning.
1545+
// We don't want to print a warning if the version
1546+
// without the extension is just a symlink to the version
1547+
// WITH an extension, which people may want to do to
1548+
// support multiple Cargo versions at once and not
1549+
// get a warning.
15501550
if possible_handle != possible_with_extension_handle {
15511551
self.shell().warn(format!(
15521552
"both `{}` and `{}` exist. Using `{}`",
@@ -1556,13 +1556,13 @@ impl GlobalContext {
15561556
))?;
15571557
}
15581558
} else {
1559-
self.shell().warn(format!(
1560-
"`{}` is deprecated in favor of `{filename_without_extension}.toml`",
1561-
possible.display(),
1562-
))?;
1563-
self.shell().note(
1564-
format!("if you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
1565-
)?;
1559+
self.shell().warn(format!(
1560+
"`{}` is deprecated in favor of `{filename_without_extension}.toml`",
1561+
possible.display(),
1562+
))?;
1563+
self.shell().note(
1564+
format!("if you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
1565+
)?;
15661566
}
15671567
}
15681568

0 commit comments

Comments
 (0)