all: zig fmt and rename "@XToY" to "@YFromX"

Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
Eric Joldasov
2023-06-15 13:14:16 +06:00
committed by Andrew Kelley
parent a6c8ee5231
commit 50339f595a
665 changed files with 6204 additions and 5889 deletions
+5 -5
View File
@@ -32,7 +32,7 @@ const MultiArch = union(enum) {
specific: Arch,
fn eql(a: MultiArch, b: MultiArch) bool {
if (@enumToInt(a) != @enumToInt(b))
if (@intFromEnum(a) != @intFromEnum(b))
return false;
if (a != .specific)
return true;
@@ -45,7 +45,7 @@ const MultiAbi = union(enum) {
specific: Abi,
fn eql(a: MultiAbi, b: MultiAbi) bool {
if (@enumToInt(a) != @enumToInt(b))
if (@intFromEnum(a) != @intFromEnum(b))
return false;
if (std.meta.Tag(MultiAbi)(a) != .specific)
return true;
@@ -262,9 +262,9 @@ const DestTarget = struct {
const HashContext = struct {
pub fn hash(self: @This(), a: DestTarget) u32 {
_ = self;
return @enumToInt(a.arch) +%
(@enumToInt(a.os) *% @as(u32, 4202347608)) +%
(@enumToInt(a.abi) *% @as(u32, 4082223418));
return @intFromEnum(a.arch) +%
(@intFromEnum(a.os) *% @as(u32, 4202347608)) +%
(@intFromEnum(a.abi) *% @as(u32, 4082223418));
}
pub fn eql(self: @This(), a: DestTarget, b: DestTarget, b_index: usize) bool {