File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -2783,7 +2783,6 @@ impl<T> [T] {
27832783 }
27842784 let mut base = 0usize ;
27852785
2786- let mut cmp: Ordering = Equal ;
27872786 // This loop intentionally doesn't have an early exit if the comparison
27882787 // returns Equal. We want the number of loop iterations to depend *only*
27892788 // on the size of the input slice so that the CPU can reliably predict
@@ -2796,7 +2795,7 @@ impl<T> [T] {
27962795 // SAFETY: the call is made safe by the following inconstants:
27972796 // - `mid >= 0`: by definition
27982797 // - `mid < size`: `mid = size / 2 + size / 4 + size / 8 ...`
2799- cmp = f ( unsafe { self . get_unchecked ( mid) } ) ;
2798+ let cmp = f ( unsafe { self . get_unchecked ( mid) } ) ;
28002799
28012800 // Binary search interacts poorly with branch prediction, so force
28022801 // the compiler to use conditional moves if supported by the target
You can’t perform that action at this time.
0 commit comments