Skip to content

Commit 207708f

Browse files
committed
Remove unnecessary clone
`key_entry_names` is unused after it is cloned into `ordered_names`. Signed-off-by: J Robert Ray <[email protected]>
1 parent b4f0995 commit 207708f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/spk-solve/crates/package-iterator/src/package_iterator.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,7 @@ impl SortedBuildIterator {
609609
// names should be added to the configuration
610610
// BUILD_KEY_NAME_ORDER to ensure they fall in the correct
611611
// position for a site's spk setup.
612-
let mut ordered_names = key_entry_names.clone();
613-
BUILD_KEY_NAME_ORDER.promote_names(ordered_names.as_mut_slice(), |n| n);
612+
BUILD_KEY_NAME_ORDER.promote_names(key_entry_names.as_mut_slice(), |n| n);
614613

615614
// Sort the builds by their generated keys generated from the
616615
// ordered names and values worth including.
@@ -619,7 +618,7 @@ impl SortedBuildIterator {
619618
let spec = &hm.iter().next().expect("non-empty hashmap").1.0;
620619
SortedBuildIterator::make_option_values_build_key(
621620
spec,
622-
&ordered_names,
621+
&key_entry_names,
623622
&build_name_values,
624623
builds_with_impossible_requests.contains_key(&spec.ident().clone()),
625624
)
@@ -641,7 +640,7 @@ impl SortedBuildIterator {
641640
tracing::debug!(
642641
target: BUILD_SORT_TARGET,
643642
"Keys by build option values: built from: [{}]",
644-
ordered_names
643+
key_entry_names
645644
.iter()
646645
.map(|n| n.as_str())
647646
.collect::<Vec<_>>()
@@ -659,7 +658,7 @@ impl SortedBuildIterator {
659658
spec.ident(),
660659
SortedBuildIterator::make_option_values_build_key(
661660
spec,
662-
&ordered_names,
661+
&key_entry_names,
663662
&build_name_values,
664663
builds_with_impossible_requests.contains_key(&spec.ident().clone()),
665664
),

0 commit comments

Comments
 (0)