We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e8b42c commit 9e1e989Copy full SHA for 9e1e989
src/libcore/slice/sort.rs
@@ -131,6 +131,8 @@ where
131
let mut i = 1;
132
133
for _ in 0..MAX_STEPS {
134
+ // SAFETY: We already explicitly done the bound checking with `i<len`
135
+ // All our indexing following that is only in the range {0 <= index < len}
136
unsafe {
137
// Find the next pair of adjacent out-of-order elements.
138
while i < len && !is_less(v.get_unchecked(i), v.get_unchecked(i - 1)) {
0 commit comments