map_fn_sig_item doesn't need a mutable reference

This commit is contained in:
Yotam Ofek
2025-11-08 12:35:03 +02:00
parent 6840234806
commit ab87304310
+4 -4
View File
@@ -458,7 +458,7 @@ pub(crate) fn union(mut self, other: &SerializedSearchIndex) -> SerializedSearch
other.descs[other_entryid].clone(),
other.function_data[other_entryid].clone().map(|mut func| {
fn map_fn_sig_item(
map_other_pathid_to_self_pathid: &mut Vec<usize>,
map_other_pathid_to_self_pathid: &Vec<usize>,
ty: &mut RenderType,
) {
match ty.id {
@@ -501,14 +501,14 @@ fn map_fn_sig_item(
}
}
for input in &mut func.inputs {
map_fn_sig_item(&mut map_other_pathid_to_self_pathid, input);
map_fn_sig_item(&map_other_pathid_to_self_pathid, input);
}
for output in &mut func.output {
map_fn_sig_item(&mut map_other_pathid_to_self_pathid, output);
map_fn_sig_item(&map_other_pathid_to_self_pathid, output);
}
for clause in &mut func.where_clause {
for entry in clause {
map_fn_sig_item(&mut map_other_pathid_to_self_pathid, entry);
map_fn_sig_item(&map_other_pathid_to_self_pathid, entry);
}
}
func