diff options
author | Jacob Pratt <[email protected]> | 2021-01-10 02:36:38 +0000 |
---|---|---|
committer | Jacob Pratt <[email protected]> | 2021-01-10 02:36:38 +0000 |
commit | bd8a9035481ff2c349a36471c8c7c3533c3385c3 (patch) | |
tree | 1f553b31f0e6c9505f6ef864a8c2baad10024b1a /crates/completion | |
parent | bcb9ae18de1fa405eb2add56409ae264267607bb (diff) |
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 'crates/completion')
0 files changed, 0 insertions, 0 deletions