langref: fix build failure

This commit is contained in:
Andrew Kelley
2025-12-22 18:49:10 -08:00
parent 33e302d67a
commit 691afee786
6 changed files with 61 additions and 50 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ pub fn main() !void {
.maximum = 0.20,
};
const category = threshold.categorize(0.90);
try std.fs.File.stdout().writeAll(@tagName(category));
std.log.info("category: {t}", .{category});
}
const std = @import("std");
+11 -1
View File
@@ -1,7 +1,17 @@
const std = @import("std");
// See https://github.com/ziglang/zig/issues/24510
// for the plan to simplify this code.
pub fn main() !void {
try std.fs.File.stdout().writeAll("Hello, World!\n");
var debug_allocator: std.heap.DebugAllocator(.{}) = .init;
defer _ = debug_allocator.deinit();
const gpa = debug_allocator.allocator();
var threaded: std.Io.Threaded = .init(gpa, .{});
defer threaded.deinit();
const io = threaded.io();
try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
}
// exe=succeed