mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
langref: fix build failure
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user