zig
zig copied to clipboard
`std.ArrayList` implement `std.io.Reader` when generic over `u8`
Zig Version
0.10.0-dev.2981+7090f0471
Steps to Reproduce
const std = @import("std");
test {
const allocator = std.testing.allocator;
var list = std.ArrayList(u8).init(allocator);
_ = list.writer();
_ = list.reader();
}
Expected Behavior
All 1 tests pass.
Actual Behavior
./test.zig:7:13: error: no member named 'reader' in struct 'std.array_list.ArrayListAligned(u8,null)'
_ = list.reader();
^
std.io.fixedBufferStream(list.items) may be a workaround in the meantime