Doc nitpick

`slice[i]` should assert `len > i`
This commit is contained in:
Niles Salter 2023-07-27 05:54:55 -06:00 committed by Andrew Kelley
parent e682d6eb29
commit 6548331ec9

View File

@ -3018,7 +3018,7 @@ test "basic slices" {
slice[10] += 1;
// Note that `slice.ptr` does not invoke safety checking, while `&slice[0]`
// asserts that the slice has len >= 1.
// asserts that the slice has len > 0.
}
{#code_end#}
<p>This is one reason we prefer slices to pointers.</p>