diff options
| author | gingerBill <bill@gingerbill.org> | 2021-01-09 23:43:34 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-01-09 23:43:34 +0000 |
| commit | 3bcccf88d578360bcc97e5903b316b2cfac39b03 (patch) | |
| tree | 0ae3f1f1ff2ced7b80fa23fe949443c90b92935a /core/bufio | |
| parent | 9e8c46b8de123829f26c2e92fcaf15a81c9b6b01 (diff) | |
vet all core packages
Diffstat (limited to 'core/bufio')
| -rw-r--r-- | core/bufio/reader.odin | 4 | ||||
| -rw-r--r-- | core/bufio/writer.odin | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/bufio/reader.odin b/core/bufio/reader.odin index f35706f9b..b26a2769d 100644 --- a/core/bufio/reader.odin +++ b/core/bufio/reader.odin @@ -305,13 +305,13 @@ reader_write_to :: proc(b: ^Reader, w: io.Writer) -> (n: i64, err: io.Error) { } m: i64; - if nr, cerr := io.to_writer_to(b.rd); cerr == nil { + if nr, ok := io.to_writer_to(b.rd); ok { m, err = io.write_to(nr, w); n += m; return n, err; } - if nw, cerr := io.to_reader_from(w); cerr == nil { + if nw, ok := io.to_reader_from(w); ok { m, err = io.read_from(nw, b.rd); n += m; return n, err; diff --git a/core/bufio/writer.odin b/core/bufio/writer.odin index 97f24a224..28870dcea 100644 --- a/core/bufio/writer.odin +++ b/core/bufio/writer.odin @@ -172,7 +172,7 @@ writer_read_from :: proc(b: ^Writer, r: io.Reader) -> (n: i64, err: io.Error) { return 0, b.err; } if writer_buffered(b) == 0 { - if w, cerr := io.to_reader_from(b.wr); cerr != nil { + if w, ok := io.to_reader_from(b.wr); !ok { n, err = io.read_from(w, r); b.err = err; return; |