Skip to main content

repair_consecutive

Function repair_consecutive 

Source
fn repair_consecutive(buf: &mut [char], limit: usize)
Expand description

Single-pass repair: scans buf and, whenever a run grows past limit, swaps the offending character with the next non-matching character ahead in the buffer. Used only when re-shuffling fails to clear the constraint (typically when the available pool is degenerately small relative to the requested length).