hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 485f452a544f53b4e452f3915f49b49200a27470
parent 7d6b7ec2fadabeb51d530b924926f3f9296caf3f
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon, 10 Oct 2022 17:28:29 -0400

io: use writeall in copy_fallback

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mio/copy.ha | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/io/copy.ha b/io/copy.ha @@ -44,11 +44,7 @@ fn copy_fallback(dest: handle, src: handle) (error | size) = { for (true) { match (read(src, buf[..])?) { case let n: size => - for (let i = 0z; i < n) { - let r = write(dest, buf[i..n])?; - w += r; - i += r; - }; + w += writeall(dest, buf[..n])?; case EOF => break; };