From 0ed4b4acdfa6790e02c9ea937e26b581510735aa Mon Sep 17 00:00:00 2001 From: rami3l Date: Sat, 4 May 2024 17:49:17 +0800 Subject: [PATCH] Apply Clippy suggestions --- src/cli/rustup_mode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index bef07c4693e..cbfa631ce87 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -1176,7 +1176,7 @@ fn show(cfg: &Cfg, m: &ArgMatches) -> Result { )?; writeln!(t.lock(), "name: {}", active_toolchain.name())?; writeln!(t.lock(), "compiler: {}", active_toolchain.rustc_version())?; - writeln!(t.lock(), "active because: {}", active_reason.to_string())?; + writeln!(t.lock(), "active because: {}", active_reason)?; // show installed targets for the active toolchain writeln!(t.lock(), "installed targets:")?; @@ -1214,7 +1214,7 @@ fn show_active_toolchain(cfg: &Cfg, m: &ArgMatches) -> Result { let cwd = utils::current_dir()?; match cfg.find_active_toolchain(&cwd)? { Some((toolchain_name, reason)) => { - let toolchain = new_toolchain_with_reason(cfg, toolchain_name.clone().into(), &reason)?; + let toolchain = new_toolchain_with_reason(cfg, toolchain_name.clone(), &reason)?; writeln!( process().stdout().lock(), "{}\nactive because: {}",