hare

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

commit e34554b7d315cce08d8a0df78bcbf39c25834af8
parent 3db09e111c69a8af9da8f8de4ef9d543774c0303
Author: Sebastian <sebastian@sebsite.pw>
Date:   Thu,  5 May 2022 17:34:49 -0400

hare::module: use strings::freeall in scan

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mhare/module/scan.ha | 11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/hare/module/scan.ha b/hare/module/scan.ha @@ -129,15 +129,8 @@ fn scan_directory( ) (void | error) = { let files: []str = [], dirs: []str = []; defer { - for (let i = 0z; i < len(files); i += 1) { - free(files[i]); - }; - free(files); - - for (let i = 0z; i < len(dirs); i += 1) { - free(dirs[i]); - }; - free(dirs); + strings::freeall(files); + strings::freeall(dirs); }; let pathbuf = path::init();