Skip to content

Commit d3349ac

Browse files
committed
[Zig/Httpz] fix build error 3
1 parent 568ea88 commit d3349ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frameworks/Zig/httpz/src/endpoints.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn getFortunesHtml(allocator: std.mem.Allocator, pool: *pg.Pool) ![]const u8 {
9292
try sb.appendSlice(allocator, "<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr>");
9393

9494
for (fortunes) |ft| {
95-
try writer.print("<tr><td>{d}</td><td>{}</td></tr>", .{
95+
try writer.print("<tr><td>{d}</td><td>{s}</td></tr>", .{
9696
ft.id,
9797
try deescapeHtml(allocator, ft.message),
9898
});

frameworks/Zig/httpz/src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn main() !void {
2121
defer pg_pool.deinit();
2222

2323
const date_thread = try std.Thread.spawn(.{}, struct {
24-
fn update() void {
24+
fn update() !void {
2525
const ally = std.heap.page_allocator;
2626
while (true) {
2727
const now = datetimez.datetime.Date.now();

0 commit comments

Comments
 (0)