authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-29 16:21:38 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-29 16:21:38 -07:00
loga4957630082ff3a926f0564148b443c8703cc2f8
tree5cb9d3dd67c3064e6b0c9fe054bd1d09fc495b91
parent5b8822b0ce95061479c8cd4fc1ed555defa64a14
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fix compile error in Status.phrase


2 files changed, 6 insertions(+), 0 deletions(-)

http.zig+2
...@@ -90,6 +90,8 @@ pub const Status = enum(u10) {...@@ -90,6 +90,8 @@ pub const Status = enum(u10) {
9090
91 pub fn phrase(self: Status) []const u8 {91 pub fn phrase(self: Status) []const u8 {
92 return switch (self) {92 return switch (self) {
93 .invalid => unreachable,
94
93 // 1xx statuses95 // 1xx statuses
94 .@"continue" => "Continue",96 .@"continue" => "Continue",
95 .switching_protocols => "Switching Protocols",97 .switching_protocols => "Switching Protocols",
test.zig+4
...@@ -13,6 +13,10 @@ test {...@@ -13,6 +13,10 @@ test {
13 try req.writeUA();13 try req.writeUA();
14 try req.send();14 try req.send();
15}15}
16test {
17 _ = &http.Status.phrase;
18 _ = &http.Status.digits;
19}
1620
17// zig fmt: off21// zig fmt: off
18test { try httpbinMethod(.http, .GET); }22test { try httpbinMethod(.http, .GET); }