mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 01:42:54 +03:00
dda4a881e0
String::remove_matches O(n^2) -> O(n) Copy only non-matching bytes. Replace collection of matches into a vector with iteration over rejections, exploiting the guarantee that we mutate parts of the haystack that have already been searched over. r? `@joshtriplett`