hare

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

commit 2eb4270b1f81f926fecea89388e32a101ba7270b
parent 82f878ecec4cd9415686c24c3fefece16ad1bc14
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Wed,  3 Mar 2021 23:12:52 -0500

io+test::bs_read: use slice copying

Diffstat:
Mio/+test/strings.ha | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/io/+test/strings.ha b/io/+test/strings.ha @@ -38,8 +38,7 @@ fn bs_read(s: *stream, buf: []u8) (size | error | EOF) = { return EOF; }; const n = if (len(buf) > len(stream.buf)) len(stream.buf) else len(buf); - // TODO: Fix me up once slice copying is in - rt::memcpy(buf: *[*]u8, stream.buf: *[*]u8, n); + buf[..n] = stream.buf[..n]; stream.buf = stream.buf[n..]; return n; };