about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiotr Osiewicz <24362066+osiewicz@users.noreply.github.com>2025-05-29 13:17:29 +0200
committerPiotr Osiewicz <24362066+osiewicz@users.noreply.github.com>2025-05-29 13:17:29 +0200
commit8c8d2c2e1292ba4dd1dd7550ba7cef20105bc2d7 (patch)
treeb5f32c9395bd1fb9340f891acd2abb8ab8761461
parent38081f22c2d7380f272aa1d7fa9b935637701c2d (diff)
downloadrust-8c8d2c2e1292ba4dd1dd7550ba7cef20105bc2d7.tar.gz
rust-8c8d2c2e1292ba4dd1dd7550ba7cef20105bc2d7.zip
creader: Remove extraenous String::clone
-rw-r--r--compiler/rustc_metadata/src/locator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs
index 10123cb9a9d..79015aab5d3 100644
--- a/compiler/rustc_metadata/src/locator.rs
+++ b/compiler/rustc_metadata/src/locator.rs
@@ -435,7 +435,7 @@ impl<'a> CrateLocator<'a> {
                         info!("lib candidate: {}", spf.path.display());
 
                         let (rlibs, rmetas, dylibs, interfaces) =
-                            candidates.entry(hash.to_string()).or_default();
+                            candidates.entry(hash).or_default();
                         {
                             // As a perforamnce optimisation we canonicalize the path and skip
                             // ones we've already seeen. This allows us to ignore crates