mirror of
https://github.com/ziglang/zig.git
synced 2025-12-12 01:03:13 +00:00
14 lines
414 B
Zig
14 lines
414 B
Zig
const io = @import("std").io;
|
|
|
|
pub fn write(_: void, bytes: []const u8) !usize {
|
|
_ = bytes;
|
|
return 0;
|
|
}
|
|
pub fn writer() io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write) {
|
|
return io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write){ .context = {} };
|
|
}
|
|
|
|
test "crash" {
|
|
_ = io.multiWriter(.{writer()});
|
|
}
|