commit 6548331ec9fc0889ff456bd8610340499386e027 (tree)
parent e682d6eb2924d9c970b75dd9119fa02f1819e84e
Author: Niles Salter <Validark@pm.me>
Date: Thu, 27 Jul 2023 05:54:55 -0600
Doc nitpick
`slice[i]` should assert `len > i`
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/langref.html.in b/doc/langref.html.in
@@ -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>