From 5ddb9242d5a28b0b99062ac3e900fd815db30055 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Mon, 11 Dec 2023 22:35:41 +0000 Subject: [PATCH] Remove unnecessary clone --- compiler/rustc_metadata/src/rmeta/decoder.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index b9bed8cbf8375..4a348b04f038a 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1616,8 +1616,6 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { old_name && let Ok(rest) = virtual_name.strip_prefix(virtual_dir) { - let virtual_name = virtual_name.clone(); - // The std library crates are in // `$sysroot/lib/rustlib/src/rust/library`, whereas other crates // may be in `$sysroot/lib/rustlib/src/rust/` directly. So we