hare

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

commit 6819be4ca17e4ba60baf222f30274462761ff665
parent f5c13ad6db272a8b4976ba9966b30cf2d283f347
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Thu, 25 Feb 2021 08:35:30 -0500

os::exec::cmd: make better use of variadic append

Diffstat:
Mos/exec/cmd.ha | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/os/exec/cmd.ha b/os/exec/cmd.ha @@ -48,10 +48,7 @@ export fn cmd(name: str, args: str...) (command | error) = { argv = alloc([], len(args) + 1z), ... }; - append(cmd.argv, name); - for (let i = 0z; i < len(args); i += 1z) { - append(cmd.argv, args[i]); - }; + append(cmd.argv, name, ...args); return cmd; };