about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-08 01:05:48 +0000
committerbors <bors@rust-lang.org>2021-06-08 01:05:48 +0000
commitdda4a881e006c808093543eece098565c3142c46 (patch)
tree75379b125b7e468b4349c9cef963a37ee72c92e4 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parente4a60327063e82413eed50a10df3b7d19b77bda0 (diff)
parent977903bb1135e22dc7c33aee0096c383f93aa719 (diff)
downloadrust-dda4a881e006c808093543eece098565c3142c46.tar.gz
rust-dda4a881e006c808093543eece098565c3142c46.zip
Auto merge of #83515 - tamird:string-remove-matches-rev, r=m-ou-se
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions