Skip to content

Commit 793e558

Browse files
committed
avoid some bitmap clones
1 parent 710e8a5 commit 793e558

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
@@ -757,8 +757,7 @@ pub async fn compute_module_batches(
757757
// Create the batch groups by grouping batches with the same chunk groups
758758
let mut batch_groups: FxHashMap<_, Vec<_>> = FxHashMap::default();
759759
for (i, pre_batch) in pre_batches.batches.iter().enumerate() {
760-
let key =
761-
BuildHasherDefault::<FxHasher>::default().prehash(pre_batch.chunk_groups.clone());
760+
let key = BuildHasherDefault::<FxHasher>::default().prehash(&pre_batch.chunk_groups);
762761
let batch = batches[i];
763762
batch_groups.entry(key).or_default().push(batch);
764763
}
@@ -767,7 +766,7 @@ pub async fn compute_module_batches(
767766
.module_chunk_groups
768767
.get(&module)
769768
.context("all modules need to have chunk group info")?;
770-
let key = BuildHasherDefault::<FxHasher>::default().prehash(chunk_groups.clone());
769+
let key = BuildHasherDefault::<FxHasher>::default().prehash(chunk_groups);
771770
batch_groups
772771
.entry(key)
773772
.or_default()

0 commit comments

Comments
 (0)