pub fn replayed_events(
raced: Vec<PolicyEvent>,
prepared_oid: &str,
base: &Base,
onto: &str,
rebuilt: &ReplayedCommit,
) -> Vec<PolicyEvent>Expand description
What: The events of one replay: the lost race, the replayed commit, and the dropped signature headers when there are some. Why: The incumbent prints them in this order, and the headers event only when the rebuild dropped a header.
In TS you’d write (pseudocode):
[raceLost, commitReplayed, ...(dropped.length > 0 ? [replayHeadersDropped] : [])]