From c4d1597f503f812fdf514cdeca50a3f61781b76d Mon Sep 17 00:00:00 2001 From: Marc Tiehuis Date: Mon, 13 May 2019 20:04:25 +1200 Subject: Mmap debug info on linux Closes #907. --- std/io.zig | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'std/io.zig') diff --git a/std/io.zig b/std/io.zig index 1f363b47b1..e47b2188c8 100644 --- a/std/io.zig +++ b/std/io.zig @@ -36,6 +36,7 @@ pub fn getStdIn() GetStdIoErrs!File { } pub const SeekableStream = @import("io/seekable_stream.zig").SeekableStream; +pub const SliceSeekableInStream = @import("io/seekable_stream.zig").SliceSeekableInStream; pub const COutStream = @import("io/c_out_stream.zig").COutStream; pub fn InStream(comptime ReadError: type) type { @@ -1115,12 +1116,10 @@ pub fn Deserializer(comptime endian: builtin.Endian, comptime packing: Packing, pub const Stream = InStream(Error); pub fn init(in_stream: *Stream) Self { - return Self{ - .in_stream = switch (packing) { - .Bit => BitInStream(endian, Stream.Error).init(in_stream), - .Byte => in_stream, - }, - }; + return Self{ .in_stream = switch (packing) { + .Bit => BitInStream(endian, Stream.Error).init(in_stream), + .Byte => in_stream, + } }; } pub fn alignToByte(self: *Self) void { @@ -1326,12 +1325,10 @@ pub fn Serializer(comptime endian: builtin.Endian, comptime packing: Packing, co pub const Stream = OutStream(Error); pub fn init(out_stream: *Stream) Self { - return Self{ - .out_stream = switch (packing) { - .Bit => BitOutStream(endian, Stream.Error).init(out_stream), - .Byte => out_stream, - }, - }; + return Self{ .out_stream = switch (packing) { + .Bit => BitOutStream(endian, Stream.Error).init(out_stream), + .Byte => out_stream, + } }; } /// Flushes any unwritten bits to the stream -- cgit v1.2.3