hare

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

commit dedc4342fc1ba0750e0c7c40109b6a4b414b2ccf
parent e9803624ac9e1966a58f22c69bdf4190bdb21c53
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Tue, 19 Apr 2022 19:30:28 +0200

remove path::dup

path::buffer is a very simple structure that can be easily copied with
let new = old;, with less copying.

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Mpath/buffer.ha | 9---------
1 file changed, 0 insertions(+), 9 deletions(-)

diff --git a/path/buffer.ha b/path/buffer.ha @@ -29,15 +29,6 @@ export fn set(buf: *buffer, items: str...) (str | errors::overflow) = { return add(buf, items...); }; -// Creates a copy of another path buffer, which can be modified without -// affecting the original. -export fn dup(buf: *buffer) buffer = { - let new = buffer { ... }; - new.buf[..] = buf.buf[..]; - new.end = 0; - return new; -}; - // Returns the current path stored in this buffer. The path will always be // normalized, which is to say that it will not include any of the following: //