zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 2df3de1e209076cb27d6573a0cdd2bed075d88b3 (tree)
parent 68d3e103b707f8d55ba29ed8c5ccfdcf791076ca
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sun, 18 Feb 2024 22:14:53 -0700

std.http.Server: no more dynamic allocation

In particular remove OutOfMemory from the error set for parsing client
http headers.

Diffstat:
Mlib/std/http/Server.zig | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/std/http/Server.zig b/lib/std/http/Server.zig @@ -96,7 +96,7 @@ pub const Request = struct { }; } - pub const ParseError = Allocator.Error || error{ + pub const ParseError = error{ UnknownHttpMethod, HttpHeadersInvalid, HttpHeaderContinuationsUnsupported, @@ -612,7 +612,6 @@ const http = std.http; const mem = std.mem; const net = std.net; const Uri = std.Uri; -const Allocator = mem.Allocator; const assert = std.debug.assert; const Server = @This();