From f2ff3a15c6d7b4bdb8349151bbf40b98fb2f6956 Mon Sep 17 00:00:00 2001 From: Jan-Stefan Janetzky Date: Sat, 18 Jan 2025 11:45:44 +0100 Subject: [PATCH] mutation required for this example to work the slices 3 example does not mutate `slice` but defines it via `var` --- .../version-0.13/01-language-basics/14-slices.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx b/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx index 6bfa031..17e2561 100644 --- a/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx +++ b/website/versioned_docs/version-0.13/01-language-basics/14-slices.mdx @@ -54,7 +54,7 @@ The syntax `x[n..]` can also be used when you want to slice to the end. test "slices 3" { var array = [_]u8{ 1, 2, 3, 4, 5 }; var slice = array[0..]; - _ = slice; + slice = slice; } ```