From ad6cb8ee404036259f788e4d548b9b5a7d75389a Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 7 Jun 2026 20:49:51 -0700 Subject: [PATCH] update to zig 0.16.0 --- README.md | 2 +- build.zig | 2 +- http.zig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d78c7fccc4dc4f5fdc9cdb0d705d47776b9ba43..3633a1b2d33f9ead8f44404b6431d09d09e114cc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![loc](https://sloc.xyz/github/nektro/zig-net-http) [![license](https://img.shields.io/github/license/nektro/zig-net-http.svg)](https://github.com/nektro/zig-net-http/blob/master/LICENSE) [![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro) -[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/) +[![Zig](https://img.shields.io/badge/Zig-0.16-f7a41d)](https://ziglang.org/) [![Zigmod](https://img.shields.io/badge/Zigmod-latest-f7a41d)](https://github.com/nektro/zigmod) An alternative HTTP server/client layer. diff --git a/build.zig b/build.zig index ef6eaf1787216206913c780a939fc349698ebdc9..41cd1b04b72535b863f8df09d94469479a0c2ae9 100644 --- a/build.zig +++ b/build.zig @@ -14,7 +14,7 @@ pub fn build(b: *std.Build) void { }), }); deps.addAllTo(tests); - tests.linkLibC(); + tests.root_module.link_libc = true; tests.use_llvm = !disable_llvm; tests.use_lld = !disable_llvm; diff --git a/http.zig b/http.zig index dc63dd00ea6f0318a993abfb646d1ce29600d93b..8baee5c5eb9e10ec4617297c694bdf5f7a4ad832 100644 --- a/http.zig +++ b/http.zig @@ -245,7 +245,7 @@ pub const ClientRequest = struct { // HTTP/1.1 200 OK if (!std.mem.eql(u8, &try req.readArray(9), "HTTP/1.1 ")) return error.Bad; const status_int = extras.parseDigits(u16, &try req.readArray(3), 10) catch return error.Bad; - const status = std.meta.intToEnum(Status, status_int) catch return error.Bad; + const status = std.enums.fromInt(Status, status_int) orelse return error.Bad; if (!std.mem.eql(u8, &try req.readArray(1), " ")) return error.Bad; var phrase_buf: [64]u8 = undefined; _ = try req.readUntilDelimitersBuf(&phrase_buf, "\r\n"); -- 2.54.0