summaryrefslogtreecommitdiff
path: root/test/unit_profile.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 17:25:52 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commit23518c9d7c061f8a06f6632da8b64b37801b514f (patch)
tree1f9688a5c2b2c224f47dd538ffab275b1f54da5c /test/unit_profile.zig
parentbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (diff)
downloadpardes-23518c9d7c061f8a06f6632da8b64b37801b514f.tar.gz
pardes-23518c9d7c061f8a06f6632da8b64b37801b514f.zip
zig fmt for Zig 0.17
Diffstat (limited to 'test/unit_profile.zig')
-rw-r--r--test/unit_profile.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit_profile.zig b/test/unit_profile.zig
index 59794df9..941efeb2 100644
--- a/test/unit_profile.zig
+++ b/test/unit_profile.zig
@@ -6,7 +6,7 @@ const Memory = struct { rss_after_bytes: ?usize = null, cumulative_peak_rss_byte
fn send(io: std.Io, file: std.Io.File, tag: Client.Tag, body: []const u8, deadline: std.Io.Timeout) !void {
var header: [8]u8 = undefined;
- std.mem.writeInt(u32, header[0..4], @intFromEnum(tag), .little);
+ std.mem.writeInt(u32, header[0..4], @backingInt(tag), .little);
std.mem.writeInt(u32, header[4..8], @intCast(body.len), .little);
for ([_][]const u8{ &header, body }) |part| {
var offset: usize = 0;
@@ -36,7 +36,7 @@ fn readAll(io: std.Io, file: std.Io.File, bytes: []u8, deadline: std.Io.Timeout)
fn receive(io: std.Io, file: std.Io.File, gpa: std.mem.Allocator, deadline: std.Io.Timeout) !struct { tag: Server.Tag, body: []u8 } {
var header: [8]u8 = undefined;
try readAll(io, file, &header, deadline);
- const tag: Server.Tag = @enumFromInt(std.mem.readInt(u32, header[0..4], .little));
+ const tag: Server.Tag = @fromBackingInt(@intCast(std.mem.readInt(u32, header[0..4], .little)));
const len = std.mem.readInt(u32, header[4..8], .little);
if (len > 16 * 1024 * 1024) return error.MessageTooLarge;
const bytes = try gpa.alloc(u8, len);