Skip to content

Commit 6e6700a

Browse files
authored
[turbopack] Remove some bitmap clones (#84193)
The lifetimes are well scoped so we can just use references.
1 parent e64f536 commit 6e6700a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

turbopack/crates/turbopack-core/src/module_graph/module_batches.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,7 @@ pub async fn compute_module_batches(
751751
// Create the batch groups by grouping batches with the same chunk groups
752752
let mut batch_groups: FxHashMap<_, Vec<_>> = FxHashMap::default();
753753
for (i, pre_batch) in pre_batches.batches.iter().enumerate() {
754-
let key =
755-
BuildHasherDefault::<FxHasher>::default().prehash(pre_batch.chunk_groups.clone());
754+
let key = BuildHasherDefault::<FxHasher>::default().prehash(&pre_batch.chunk_groups);
756755
let batch = batches[i];
757756
batch_groups.entry(key).or_default().push(batch);
758757
}
@@ -761,7 +760,7 @@ pub async fn compute_module_batches(
761760
.module_chunk_groups
762761
.get(&module)
763762
.context("all modules need to have chunk group info")?;
764-
let key = BuildHasherDefault::<FxHasher>::default().prehash(chunk_groups.clone());
763+
let key = BuildHasherDefault::<FxHasher>::default().prehash(chunk_groups);
765764
batch_groups
766765
.entry(key)
767766
.or_default()

0 commit comments

Comments
 (0)