authorgravatar for Validark@pm.meNiles Salter <Validark@pm.me> 2023-07-27 05:54:55-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-28 10:30:32-07:00
log6548331ec9fc0889ff456bd8610340499386e027
tree241f22a166a271266682f865e612964c3741e41b
parente682d6eb2924d9c970b75dd9119fa02f1819e84e

Doc nitpick

`slice[i]` should assert `len > i`

1 files changed, 1 insertions(+), 1 deletions(-)

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