Open
Description
Location
https://doc.rust-lang.org/std/primitive.slice.html#method.binary_search
Summary
Documentation states, that
If the slice is not sorted, the returned result is unspecified and meaningless.
but if we try to use binary search on something like [5,4,3,2,1].binary_search(&5)
it will end up with error, though the slice is sorted in descending order.
This either requires to fix docs to something like
If the slice is not sorted in ascending order, the returned result is unspecified and meaningless.
or fix actual binary search algorithm by flipping direction of search in case left and right bounds are flipped.