diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-15 18:13:56 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-15 18:13:56 +0100 |
| commit | 4035fec784fc7e0109d2f8a3d3bbfb5696512de1 (patch) | |
| tree | e961505ebf199e62a9db447a551fc8ace63ade4c /core/bufio | |
| parent | b071a07c86f39f3f37ff74dcb05266cf4cbd9540 (diff) | |
Add more uses of `or_return`
Diffstat (limited to 'core/bufio')
| -rw-r--r-- | core/bufio/writer.odin | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/bufio/writer.odin b/core/bufio/writer.odin index cb6b39525..f2b33d591 100644 --- a/core/bufio/writer.odin +++ b/core/bufio/writer.odin @@ -183,9 +183,7 @@ writer_read_from :: proc(b: ^Writer, r: io.Reader) -> (n: i64, err: io.Error) { for { if writer_available(b) == 0 { - if ferr := writer_flush(b); ferr != nil { - return n, ferr; - } + writer_flush(b) or_return; } if b.max_consecutive_empty_writes <= 0 { b.max_consecutive_empty_writes = DEFAULT_MAX_CONSECUTIVE_EMPTY_READS; |