about summary refs log tree commit diff
path: root/docs/dev
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2021-01-09 21:36:38 -0500
committerJacob Pratt <jacob@jhpratt.dev>2021-01-09 21:36:38 -0500
commitbd8a9035481ff2c349a36471c8c7c3533c3385c3 (patch)
tree1f553b31f0e6c9505f6ef864a8c2baad10024b1a /docs/dev
parentbcb9ae18de1fa405eb2add56409ae264267607bb (diff)
downloadrust-bd8a9035481ff2c349a36471c8c7c3533c3385c3.tar.gz
rust-bd8a9035481ff2c349a36471c8c7c3533c3385c3.zip
Remove unnecessary allocation
The case-insensitive prefix/suffix check can be performed
character-by-character. This allows the check to be done without having
to allocate a new string. As a side effect, it's also no longer
necessary to convert the entire string to lowercase, as it's done as
needed. As the only case equality we're handling is ASCII, this
operation can be further optimized by using byte equality, rather than
character equality.
Diffstat (limited to 'docs/dev')
0 files changed, 0 insertions, 0 deletions