diff options
author | Julien Dessaux | 2024-11-22 09:27:23 +0100 |
---|---|---|
committer | Julien Dessaux | 2024-11-22 09:28:09 +0100 |
commit | 06468c1272035fcacf6d46a80b5738b55cffae38 (patch) | |
tree | 55ae36dc5c9d25cbf73da49c6bd6c887fe79605f /src/io.zig | |
parent | Removed useless testing boilerplate (diff) | |
download | zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.tar.gz zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.tar.bz2 zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.zip |
Diffstat (limited to 'src/io.zig')
-rw-r--r-- | src/io.zig | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -12,14 +12,14 @@ pub fn Context(comptime readerType: anytype, comptime writerType: anytype) type return c; } var buffer = [_]u8{0}; - var n = try self.reader.read(buffer[0..]); + const n = try self.reader.read(buffer[0..]); if (n == 1) { return buffer[0]; } return error.IOError; } test "characterInput" { - var stdin = std.io.fixedBufferStream("ab0"); + const stdin = std.io.fixedBufferStream("ab0"); var stdout = std.ArrayList(u8).init(std.testing.allocator); defer stdout.deinit(); var ioContext = context(stdin, stdout); @@ -49,7 +49,7 @@ pub fn Context(comptime readerType: anytype, comptime writerType: anytype) type return result; } test "decimalInput" { - var stdin = std.io.fixedBufferStream("1 234abc5d6ef"); + const stdin = std.io.fixedBufferStream("1 234abc5d6ef"); var stdout = std.ArrayList(u8).init(std.testing.allocator); defer stdout.deinit(); var ioContext = context(stdin, stdout); |