async fn sort_pdus(
pdus: SmallVec<[(usize, (OwnedRoomId, OwnedEventId, CanonicalJsonObject)); 1]>,
) -> SmallVec<[(usize, (OwnedRoomId, OwnedEventId, CanonicalJsonObject)); 1]> ⓘExpand description
Reorder a room’s transaction PDUs so each event follows the in-batch events it references. An already-ordered batch is returned unchanged; references to events outside the batch are non-edges. The sort is an optimization, so a failure falls back to the arrival order.