From aeaef8c0ffadab4145fd002f2edd87a6db66ebd1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 18 Feb 2023 09:02:57 -0700 Subject: update std lib and compiler sources to new for loop syntax --- lib/std/packed_int_array.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/packed_int_array.zig') diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig index f15ddbe974..f42e1016aa 100644 --- a/lib/std/packed_int_array.zig +++ b/lib/std/packed_int_array.zig @@ -215,7 +215,7 @@ pub fn PackedIntArrayEndian(comptime Int: type, comptime endian: Endian, comptim /// or, more likely, an array literal. pub fn init(ints: [int_count]Int) Self { var self = @as(Self, undefined); - for (ints) |int, i| self.set(i, int); + for (ints, 0..) |int, i| self.set(i, int); return self; } -- cgit v1.2.3 From 281d4c0ff6f95de0090f3621b4bdb651cd3d0330 Mon Sep 17 00:00:00 2001 From: The Potato Chronicler <45178972+ThePotatoChronicler@users.noreply.github.com> Date: Sun, 19 Feb 2023 13:12:09 +0100 Subject: Fix grammatical error in doc comment --- lib/std/packed_int_array.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/packed_int_array.zig') diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig index f15ddbe974..6ef7ebeaf4 100644 --- a/lib/std/packed_int_array.zig +++ b/lib/std/packed_int_array.zig @@ -1,4 +1,4 @@ -//! An set of array and slice types that bit-pack integer elements. A normal [12]u3 +//! A set of array and slice types that bit-pack integer elements. A normal [12]u3 //! takes up 12 bytes of memory since u3's alignment is 1. PackedArray(u3, 12) only //! takes up 4 bytes of memory. -- cgit v1.2.3