diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-15 11:36:35 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-15 11:36:35 +0800 |
commit | b9e1c42a47b40c8dbd9e20da816e28be5c1d5b09 (patch) | |
tree | 8c9cdabc3b9815b332020bf1aedd7644a5c8f4fc /url.ha | |
parent | Add the CSS (diff) | |
download | forge-b9e1c42a47b40c8dbd9e20da816e28be5c1d5b09.tar.gz forge-b9e1c42a47b40c8dbd9e20da816e28be5c1d5b09.tar.zst forge-b9e1c42a47b40c8dbd9e20da816e28be5c1d5b09.zip |
Use strings::freeall directly instead of wrapping it
Diffstat (limited to '')
-rw-r--r-- | url.ha | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1,13 +1,10 @@ use strings; use net::uri; +// The result must be freed with strings::freeall; fn segments_from_path(s: str) ([]str | nomem | net::uri::invalid) = { let sp: []str = strings::split(s, "/")?; for (let i = 1z; i < len(sp); i += 1) sp[i - 1] = net::uri::percent_decode(sp[i])?; return sp[.. len(sp) - 1]; }; - -fn free_segments(ss: []str) void = { - strings::freeall(ss); -}; |