mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-18 01:56:30 +00:00
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`