diff options
| author | Marc Tiehuis <marctiehuis@gmail.com> | 2019-05-14 16:43:21 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-14 16:43:21 +1200 |
| commit | b64cee2ec2cdfd4c49208b3b32bb925233a73e08 (patch) | |
| tree | 4a4387479ba8084d7e0f3009a2b54a363f1ba814 /std/io.zig | |
| parent | 08d41da916787ab0c19130dc4dc4e7b0e75c9fa8 (diff) | |
| parent | c4d1597f503f812fdf514cdeca50a3f61781b76d (diff) | |
| download | zig-b64cee2ec2cdfd4c49208b3b32bb925233a73e08.tar.gz zig-b64cee2ec2cdfd4c49208b3b32bb925233a73e08.zip | |
Merge pull request #2482 from ziglang/linux-elf-read
Mmap debug info on linux
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 21 |
1 files changed, 9 insertions, 12 deletions
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 |
