Fix error union compile errors

This commit is contained in:
jaina heartles 2022-07-09 15:18:48 -07:00
parent f86873395b
commit ff6d8f8e03

View file

@ -27,7 +27,7 @@ pub const Context = struct {
const HttpServer = struct { const HttpServer = struct {
conn_server: http.ConnectionServer, conn_server: http.ConnectionServer,
pub fn listen(addr: std.net.Address) !HttpServer { pub fn listen(addr: std.net.Address) !HttpServer {
return .{ return HttpServer{
.conn_server = try http.ConnectionServer.listen(addr), .conn_server = try http.ConnectionServer.listen(addr),
}; };
} }
@ -42,7 +42,7 @@ const HttpServer = struct {
continue; continue;
}; };
return .{ .connection = conn, .request = req, .alloc = alloc }; return Context{ .connection = conn, .request = req, .alloc = alloc };
} }
} }