I think this refactoring made it less efficient as you now need to collect the intermediates. I didn't think we need that, but you want to have a function, maybe you can make it borrowing from reports and producing an iterator, like this
fn group_report_pairs<'a, BK, V>(
reports: &'a [PrfHybridReport<BK, V>],
) -> impl Iterator<Item = [AggregateableHybridReport<BK, V>; 2]>> + 'a
Originally posted by @akoshelev in #1434 (comment)