Skip to content

Commit 75d6e19

Browse files
joboetgitbot
authored and
gitbot
committed
core: use public method instead of instrinsic
1 parent 7e1621f commit 75d6e19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/slice/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![stable(feature = "rust1", since = "1.0.0")]
88

99
use crate::cmp::Ordering::{self, Equal, Greater, Less};
10-
use crate::intrinsics::{exact_div, select_unpredictable, unchecked_sub};
10+
use crate::intrinsics::{exact_div, unchecked_sub};
1111
use crate::mem::{self, SizedTypeProperties};
1212
use crate::num::NonZero;
1313
use crate::ops::{Bound, OneSidedRange, Range, RangeBounds, RangeInclusive};
@@ -2835,7 +2835,7 @@ impl<T> [T] {
28352835
// Binary search interacts poorly with branch prediction, so force
28362836
// the compiler to use conditional moves if supported by the target
28372837
// architecture.
2838-
base = select_unpredictable(cmp == Greater, base, mid);
2838+
base = (cmp == Greater).select_unpredictable(base, mid);
28392839

28402840
// This is imprecise in the case where `size` is odd and the
28412841
// comparison returns Greater: the mid element still gets included

0 commit comments

Comments
 (0)