From a0bbc1f650abbfae6771b282c1bdc2be019c6f30 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 24 Apr 2024 11:25:20 +0100 Subject: [PATCH] config reading: use same_file for suppressing "both files" warning (fmt) Apply deferred indentation changes. Whitespace change only. --- src/cargo/util/context/mod.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cargo/util/context/mod.rs b/src/cargo/util/context/mod.rs index a7b127b8af2c..c75e9ed3b955 100644 --- a/src/cargo/util/context/mod.rs +++ b/src/cargo/util/context/mod.rs @@ -1547,11 +1547,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 `{}`", @@ -1561,13 +1561,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`"), + )?; } }