diff options
author | Pascal Kuthe | 2023-03-22 17:38:32 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-03-27 00:54:40 +0000 |
commit | 7cf448eb5bfd604e1342a1d0f5685e3231f6c1a9 (patch) | |
tree | de7af63bddff781fae751e80dfab98bb751244f3 /helix-core/src/movement.rs | |
parent | 72b93116784ec944f49c7f6a335b0aa663f1430e (diff) |
use partition_point instead of binary_search_by
Using `partition_point` ensures we always find the first entry.
With binary search it is "random" (deterministic but implementation
specific) which index is retruned if there are multiple equal elements.
`partition_point` was added to the standard library to cover extactly
the usecase here.
Diffstat (limited to 'helix-core/src/movement.rs')
0 files changed, 0 insertions, 0 deletions