mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
fix Serializer to work with new OutStream API
This commit is contained in:
parent
eb4d313dbc
commit
880d8fc380
@ -1,6 +1,10 @@
|
||||
const std = @import("../std.zig");
|
||||
const builtin = std.builtin;
|
||||
const io = std.io;
|
||||
const assert = std.debug.assert;
|
||||
const math = std.math;
|
||||
const meta = std.meta;
|
||||
const trait = meta.trait;
|
||||
|
||||
pub const Packing = enum {
|
||||
/// Pack data to byte alignment
|
||||
@ -252,7 +256,7 @@ pub fn Serializer(comptime endian: builtin.Endian, comptime packing: Packing, co
|
||||
byte.* = if (t_bit_count < u8_bit_count) v else @truncate(u8, v);
|
||||
}
|
||||
|
||||
try self.out_stream.write(&buffer);
|
||||
try self.out_stream.writeAll(&buffer);
|
||||
}
|
||||
|
||||
/// Serializes the passed value into the stream
|
||||
|
Loading…
Reference in New Issue
Block a user