From 375813ea371e4564d37b10fb4cc2ab23a7dabe88 Mon Sep 17 00:00:00 2001 From: Aniruddha Roy <65581823+ani3321r@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:21:42 +0530 Subject: [PATCH] Update 30-vectors.mdx codeblock for vector looping repeated twice --- .../version-0.13/01-language-basics/30-vectors.mdx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/website/versioned_docs/version-0.13/01-language-basics/30-vectors.mdx b/website/versioned_docs/version-0.13/01-language-basics/30-vectors.mdx index 064e114..0d301fd 100644 --- a/website/versioned_docs/version-0.13/01-language-basics/30-vectors.mdx +++ b/website/versioned_docs/version-0.13/01-language-basics/30-vectors.mdx @@ -40,18 +40,6 @@ multiply a vector by a scalar. Vectors do not have a `len` field like arrays, but may still be looped over. {VectorsLooping} -```zig -test "vector looping" { - const x = @Vector(4, u8){ 255, 0, 255, 0 }; - var sum = blk: { - var tmp: u10 = 0; - var i: u8 = 0; - while (i < 4) : (i += 1) tmp += x[i]; - break :blk tmp; - }; - try expect(sum == 510); -} -``` Vectors coerce to their respective arrays.