diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index d3bab3365bf..ab3dc1c26a9 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -375,7 +375,7 @@ impl TargetInfo { suffix, prefix: prefix.clone(), flavor: FileFlavor::DebugInfo, - crate_type: Some(crate_type.clone()), + crate_type: Some(crate_type), // macOS tools like lldb use all sorts of magic to locate // dSYM files. See https://lldb.llvm.org/use/symbols.html // for some details. It seems like a `.dSYM` located next @@ -389,7 +389,7 @@ impl TargetInfo { suffix: ".pdb".to_string(), prefix: prefix.clone(), flavor: FileFlavor::DebugInfo, - crate_type: Some(crate_type.clone()), + crate_type: Some(crate_type), // The absolute path to the pdb file is embedded in the // executable. If the exe/pdb pair is moved to another // machine, then debuggers will look in the same directory @@ -466,7 +466,7 @@ impl TargetInfo { } else { FileFlavor::Normal }; - let file_types = self.file_types(&crate_type, flavor, target_triple)?; + let file_types = self.file_types(crate_type, flavor, target_triple)?; match file_types { Some(types) => { result.extend(types); diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 93922ea7e0e..aaa7c7ef591 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -777,7 +777,7 @@ fn build_base_args( cmd.arg("-C").arg(format!("panic={}", panic)); } - match cx.lto[&unit] { + match cx.lto[unit] { lto::Lto::Run(None) => { cmd.arg("-C").arg("lto"); }