diff options
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/http/Server.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/http/Server.zig b/lib/std/http/Server.zig index 04bdfe39b7..a0c4774e06 100644 --- a/lib/std/http/Server.zig +++ b/lib/std/http/Server.zig @@ -393,7 +393,7 @@ pub const Response = struct { pub const DoError = Connection.WriteError || error{ UnsupportedTransferEncoding, InvalidContentLength }; /// Send the response headers. - pub fn do(res: *Response) !void { + pub fn do(res: *Response) DoError!void { switch (res.state) { .waited => res.state = .responded, .first, .start, .responded, .finished => unreachable, @@ -668,7 +668,7 @@ pub fn deinit(server: *Server) void { pub const ListenError = std.os.SocketError || std.os.BindError || std.os.ListenError || std.os.SetSockOptError || std.os.GetSockNameError; /// Start the HTTP server listening on the given address. -pub fn listen(server: *Server, address: net.Address) !void { +pub fn listen(server: *Server, address: net.Address) ListenError!void { try server.socket.listen(address); } |
