From 880d8fc38089a406c6b3225148a6f50ae452cb6b Mon Sep 17 00:00:00 2001 From: momumi <57862114+momumi@users.noreply.github.com> Date: Sun, 15 Mar 2020 16:09:28 +1000 Subject: [PATCH] fix Serializer to work with new OutStream API --- lib/std/io/serialization.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/std/io/serialization.zig b/lib/std/io/serialization.zig index 4aa462aab8..4aea4ed892 100644 --- a/lib/std/io/serialization.zig +++ b/lib/std/io/serialization.zig @@ -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