Skip to content

Commit 6486538

Browse files
authored
docs: fix typo change from inconstants to invariants
1 parent 077cedc commit 6486538

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2814,7 +2814,7 @@ impl<T> [T] {
28142814
let half = size / 2;
28152815
let mid = base + half;
28162816

2817-
// SAFETY: the call is made safe by the following inconstants:
2817+
// SAFETY: the call is made safe by the following invariants:
28182818
// - `mid >= 0`: by definition
28192819
// - `mid < size`: `mid = size / 2 + size / 4 + size / 8 ...`
28202820
let cmp = f(unsafe { self.get_unchecked(mid) });

0 commit comments

Comments
 (0)