diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-09-05 15:00:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-20 18:33:00 -0700 |
| commit | 5ec0a7d8a5201fb35334ce62f82c5958b6ba296e (patch) | |
| tree | 1874ea546d4b71e1c02f3cd37e7b2747f3f791e6 /lib/std/meta.zig | |
| parent | 9b74651cd2b799a73518de26c8293636f910c833 (diff) | |
| download | zig-5ec0a7d8a5201fb35334ce62f82c5958b6ba296e.tar.gz zig-5ec0a7d8a5201fb35334ce62f82c5958b6ba296e.zip | |
coerce vectors to arrays rather than inline for
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 222d3276d5..9f4d0aaeeb 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -742,12 +742,7 @@ pub fn eql(a: anytype, b: @TypeOf(a)) bool { if (!eql(e, b[i])) return false; return true; }, - .vector => |info| { - inline for (0..info.len) |i| { - if (a[i] != b[i]) return false; - } - return true; - }, + .vector => return @reduce(.And, a == b), .pointer => |info| { return switch (info.size) { .one, .many, .c => a == b, |
