about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-31 15:59:40 +0200
committerGitHub <noreply@github.com>2020-03-31 15:59:40 +0200
commit9ee373fd945511669775b8fd2c00990373ded8c7 (patch)
tree94dac3a31698ebc67d10a704750a98ed75d366ea /src/test/debuginfo/enum-thinlto.rs
parent2113659479a82ea69633b23ef710b58ab127755e (diff)
parentac478f2f610bd93c25c82491526ea153ad103ac0 (diff)
downloadrust-9ee373fd945511669775b8fd2c00990373ded8c7.tar.gz
rust-9ee373fd945511669775b8fd2c00990373ded8c7.zip
Rollup merge of #69784 - benesch:fast-strip-prefix-suffix, r=kennytm
Optimize strip_prefix and strip_suffix with str patterns

As mentioned in https://github.com/rust-lang/rust/issues/67302#issuecomment-585639226.
I'm not sure whether adding these methods to `Pattern` is desirable—but they have default implementations so the change is backwards compatible. Plus it seems like they're slated for wholesale replacement soon anyway? #56345

----

Constructing a Searcher in strip_prefix and strip_suffix is
unnecessarily slow when the pattern is a fixed-length string. Add
strip_prefix and strip_suffix methods to the Pattern trait, and add
optimized implementations of these methods in the str implementation.
The old implementation is retained as the default for these methods.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions