Skip to content

Commit 0a1cd5b

Browse files
committed
Remove some unnecessary &muts.
1 parent dc25fbe commit 0a1cd5b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ struct PlacedRootMonoItems<'tcx> {
136136
// The output CGUs are sorted by name.
137137
fn partition<'tcx, I>(
138138
tcx: TyCtxt<'tcx>,
139-
mono_items: &mut I,
139+
mono_items: I,
140140
max_cgu_count: usize,
141141
usage_map: &UsageMap<'tcx>,
142142
) -> Vec<CodegenUnit<'tcx>>
@@ -239,7 +239,7 @@ where
239239

240240
fn place_root_mono_items<'tcx, I>(
241241
cx: &PartitioningCx<'_, 'tcx>,
242-
mono_items: &mut I,
242+
mono_items: I,
243243
) -> PlacedRootMonoItems<'tcx>
244244
where
245245
I: Iterator<Item = MonoItem<'tcx>>,
@@ -951,12 +951,8 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
951951
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
952952
sync::join(
953953
|| {
954-
let mut codegen_units = partition(
955-
tcx,
956-
&mut items.iter().copied(),
957-
tcx.sess.codegen_units(),
958-
&usage_map,
959-
);
954+
let mut codegen_units =
955+
partition(tcx, items.iter().copied(), tcx.sess.codegen_units(), &usage_map);
960956
codegen_units[0].make_primary();
961957
&*tcx.arena.alloc_from_iter(codegen_units)
962958
},

0 commit comments

Comments
 (0)