hare

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

commit cef7148ae6f7ed7a51a18da46e0cbdf71a60560e
parent 9705222092074bfe46494b773dbedf0a9b7c5355
Author: Ember Sawady <ecs@d2evs.net>
Date:   Sun, 27 Aug 2023 06:20:44 +0000

memio: improve dynamic_from documentation

Signed-off-by: Ember Sawady <ecs@d2evs.net>

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

diff --git a/memio/stream.ha b/memio/stream.ha @@ -51,7 +51,8 @@ export fn dynamic() stream = dynamic_from([]); // Like [[dynamic]], but takes an existing slice as input. Writes will // overwrite the buffer and reads consume bytes from the initial buffer. -// Like [[dynamic]], calling [[io::close]] will free the buffer. +// Ownership of the provided slice is transferred to the returned [[stream]]. +// Calling [[io::close]] will free the buffer. export fn dynamic_from(in: []u8) stream = stream { stream = &dynamic_vt, buf = in,