From c4a89fbdbad9fa261462da134e30beee86cff4a1 Mon Sep 17 00:00:00 2001 From: Cosmin Valentin Sontu Date: Mon, 26 Aug 2024 18:05:23 +0300 Subject: [PATCH] Update 14-slices.mdx --- .../version-0.13/01-language-basics/14-slices.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 063b81e..e1d041b 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 @@ -30,8 +30,8 @@ The syntax `x[n..]` can also be used when you want to slice to the end. ```zig test "slices 3" { var array = [_]u8{ 1, 2, 3, 4, 5 }; - var slice = array[0..]; - _ = slice; + const slice = array[0..]; + try expect(slice.len == array.len); } ```