pub fn merge_writes(
acc: &mut Vec<(Selector, Value)>,
new: impl IntoIterator<Item = (Selector, Value)>,
)Expand description
Append new writes to acc, keeping only the latest write per exact selector.
An earlier write to the same selector is removed and the new one is appended
at the end, so replaying acc in order still yields the same final state
while its length stays bounded by the number of distinct selectors (no
quadratic growth across loop rounds or iteration items).