We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 588f7db commit f6ab79dCopy full SHA for f6ab79d
src/libcore/slice/mod.rs
@@ -400,7 +400,7 @@ impl<T> SliceExt for [T] {
400
while size > 1 {
401
let half = size / 2;
402
let mid = base + half;
403
- // mid is always in [0, size).
+ // mid is always in [0, size), that means mid is >= 0 and < size.
404
// mid >= 0: by definition
405
// mid < size: mid = size / 2 + size / 4 + size / 8 ...
406
let cmp = f(unsafe { s.get_unchecked(mid) });
0 commit comments