summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-25 14:33:59 +0100
committerGitHub <noreply@github.com>2021-02-25 14:33:59 +0100
commit00aa3e68806e50431d51fc7f6ce66f2a4548f4cd (patch)
tree835b6499a81807a46506ae76711a6b574b7db6d5 /compiler/rustc_codegen_ssa/src
parent199095afc69e208de659aceb9269bfa2940d074d (diff)
parent003670748f88d22e19b449db4e24b35739b9e984 (diff)
downloadrust-00aa3e68806e50431d51fc7f6ce66f2a4548f4cd.tar.gz
rust-00aa3e68806e50431d51fc7f6ce66f2a4548f4cd.zip
Rollup merge of #82214 - est31:no_to_string, r=oli-obk
Remove redundant to_string calls
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index b93a579df15..08932e26bf1 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -181,16 +181,16 @@ fn get_linker(
             let original_path = tool.path();
             if let Some(ref root_lib_path) = original_path.ancestors().nth(4) {
                 let arch = match t.arch.as_str() {
-                    "x86_64" => Some("x64".to_string()),
-                    "x86" => Some("x86".to_string()),
-                    "aarch64" => Some("arm64".to_string()),
-                    "arm" => Some("arm".to_string()),
+                    "x86_64" => Some("x64"),
+                    "x86" => Some("x86"),
+                    "aarch64" => Some("arm64"),
+                    "arm" => Some("arm"),
                     _ => None,
                 };
                 if let Some(ref a) = arch {
                     // FIXME: Move this to `fn linker_with_args`.
                     let mut arg = OsString::from("/LIBPATH:");
-                    arg.push(format!("{}\\lib\\{}\\store", root_lib_path.display(), a.to_string()));
+                    arg.push(format!("{}\\lib\\{}\\store", root_lib_path.display(), a));
                     cmd.arg(&arg);
                 } else {
                     warn!("arch is not supported");