authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-04 03:57:44 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-03-04 03:57:44 -08:00
log9bfb8b5d623aed32d903e4f8a3fb5252d6b17f41
tree8d880265513a62efe111fa6668834c0f6049ecf8
parent79815fd977854c990c513cd9d5d1d618fa259fd9
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

make Status exhaustive


1 files changed, 1 insertions(+), 5 deletions(-)

http.zig+1-5
...@@ -85,9 +85,7 @@ pub const Status = enum(u10) {...@@ -85,9 +85,7 @@ pub const Status = enum(u10) {
85 not_extended = 510, // RFC277485 not_extended = 510, // RFC2774
86 network_authentication_required = 511, // RFC658586 network_authentication_required = 511, // RFC6585
8787
88 _,88 pub fn phrase(self: Status) []const u8 {
89
90 pub fn phrase(self: Status) ?[]const u8 {
91 return switch (self) {89 return switch (self) {
92 // 1xx statuses90 // 1xx statuses
93 .@"continue" => "Continue",91 .@"continue" => "Continue",
...@@ -160,8 +158,6 @@ pub const Status = enum(u10) {...@@ -160,8 +158,6 @@ pub const Status = enum(u10) {
160 .loop_detected => "Loop Detected",158 .loop_detected => "Loop Detected",
161 .not_extended => "Not Extended",159 .not_extended => "Not Extended",
162 .network_authentication_required => "Network Authentication Required",160 .network_authentication_required => "Network Authentication Required",
163
164 else => return null,
165 };161 };
166 }162 }
167};163};