Assuming datums is a List, sort them by the 2nd through Nth elements corresponding to order_by, then return the 1st element. Near the usages of this function, we sometimes want to produce Datums with a shorter lifetime than 'a. We have to actually perform the shortening of the lifetime here, inside this function, because if we were to simply return `impl Iterator >`, that wouldn't
(
datums: I,
order_by: &[ColumnOrder],
)
| 329 | /// we perform the shortening _inside_ this function: the input of the `map` is known to |
| 330 | /// specifically be `std::vec::IntoIter`, which is known to be covariant.) |
| 331 | pub fn order_aggregate_datums<'a: 'b, 'b, I>( |
| 332 | datums: I, |
| 333 | order_by: &[ColumnOrder], |
| 334 | ) -> impl Iterator<Item = Datum<'b>> |
| 335 | where |
| 336 | I: IntoIterator<Item = Datum<'a>>, |
| 337 | { |
| 338 | order_aggregate_datums_with_rank_inner(datums, order_by) |
| 339 | .into_iter() |
| 340 | // (`payload` is coerced here to `Datum<'b>` in the argument of the closure) |
| 341 | .map(|(payload, _order_datums)| payload) |
| 342 | } |
| 343 | |
| 344 | /// Assuming datums is a List, sort them by the 2nd through Nth elements |
| 345 | /// corresponding to order_by, then return the 1st element and computed order by expression. |
no test coverage detected