aboutsummaryrefslogtreecommitdiff
path: root/lib/std/http
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/http')
-rw-r--r--lib/std/http/headers.zig14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/std/http/headers.zig b/lib/std/http/headers.zig
index a7a1464f99..1e1e71e3eb 100644
--- a/lib/std/http/headers.zig
+++ b/lib/std/http/headers.zig
@@ -350,15 +350,13 @@ pub const Headers = struct {
self: Self,
comptime fmt: []const u8,
options: std.fmt.FormatOptions,
- context: var,
- comptime Errors: type,
- output: fn (@TypeOf(context), []const u8) Errors!void,
- ) Errors!void {
+ out_stream: var,
+ ) !void {
for (self.toSlice()) |entry| {
- try output(context, entry.name);
- try output(context, ": ");
- try output(context, entry.value);
- try output(context, "\n");
+ try out_stream.writeAll(entry.name);
+ try out_stream.writeAll(": ");
+ try out_stream.writeAll(entry.value);
+ try out_stream.writeAll("\n");
}
}
};