hare

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

commit af36e75cce23185e00818781df34c4f956def163
parent d2e5597389fa9d69c4319c5225aa9861933dc643
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  1 Feb 2021 13:13:39 -0500

io::copy: assert an assumption about write

We may want to address this case later

Diffstat:
Mio/copy.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/io/copy.ha b/io/copy.ha @@ -11,7 +11,8 @@ export fn copy(dest: *stream, src: *stream) (error | size) = { }, n: size => match (write(dest, buf[..n])) { err: error => return err, - size => { + r: size => { + assert(r == n); // TODO? w += n; }, },