aboutsummaryrefslogtreecommitdiff
path: root/core/bufio
diff options
context:
space:
mode:
Diffstat (limited to 'core/bufio')
-rw-r--r--core/bufio/writer.odin4
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;