]> git.lizzy.rs Git - rust.git/commit
Auto merge of #85406 - VillSnow:integrate_binary_search, r=JohnTitor
authorbors <bors@rust-lang.org>
Tue, 15 Jun 2021 22:56:41 +0000 (22:56 +0000)
committerbors <bors@rust-lang.org>
Tue, 15 Jun 2021 22:56:41 +0000 (22:56 +0000)
commit684ca335d5620c973345dbc881158fd38402af70
tree6b0833563af6bc3c51db28a5cd82868738ca9aba
parent607d6b00d4e0e0475b8de9d0c870b7126fdcdf6b
parent5db13c529c58948437535865eb6e3957e4b7bf58
Auto merge of #85406 - VillSnow:integrate_binary_search, r=JohnTitor

Integrate binary search codes of binary_search_by and partition_point

For now partition_point has own binary search code piece.
It is because binary_search_by had called the comparer more times and the author (=me) wanted to avoid it.

However, now binary_search_by uses the comparer minimum times. (#74024)
So it's time to integrate them.

The appearance of the codes are a bit different but both use completely same logic.
library/core/src/slice/mod.rs