about summary refs log tree commit diff
path: root/compiler/rustc_session/src/utils.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-12 22:07:46 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2024-10-12 22:07:46 +0200
commit4bc21e318cc26f688468188b88758202071b0a19 (patch)
treef52187b27bf28c1994e40641268e9dc03e4dcb53 /compiler/rustc_session/src/utils.rs
parente200c7f2e1a1ec7691a24539cf191f4c4d9d2a2c (diff)
downloadrust-4bc21e318cc26f688468188b88758202071b0a19.tar.gz
rust-4bc21e318cc26f688468188b88758202071b0a19.zip
remove a couple of redundant String to String conversion
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
-rw-r--r--compiler/rustc_session/src/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs
index 37528a4425f..9182789cf02 100644
--- a/compiler/rustc_session/src/utils.rs
+++ b/compiler/rustc_session/src/utils.rs
@@ -137,7 +137,7 @@ pub fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
             let content = if arg.len() == a.len() {
                 // A space-separated option, like `-C incremental=foo` or `--crate-type rlib`
                 match args.next() {
-                    Some(arg) => arg.to_string(),
+                    Some(arg) => arg,
                     None => continue,
                 }
             } else if arg.get(a.len()..a.len() + 1) == Some("=") {