aboutsummaryrefslogtreecommitdiff
path: root/url.ha
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-15 11:36:35 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-15 11:36:35 +0800
commitb9e1c42a47b40c8dbd9e20da816e28be5c1d5b09 (patch)
tree8c9cdabc3b9815b332020bf1aedd7644a5c8f4fc /url.ha
parentAdd the CSS (diff)
downloadforge-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.ha5
1 files changed, 1 insertions, 4 deletions
diff --git a/url.ha b/url.ha
index 186ea66..7162dd8 100644
--- a/url.ha
+++ b/url.ha
@@ -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);
-};