aboutsummaryrefslogtreecommitdiff
path: root/src/eval/Root.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-28 15:08:02 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-28 15:08:02 +0200
commit3b1e6547d069d7c438af551a4989972802a895ee (patch)
tree7c32e8fcac432539888e0cdb598f495316b0772d /src/eval/Root.zig
parente154408e8ddeaee83242002f4c7af68b29d3a677 (diff)
perf(html): reduce memory usage
Diffstat (limited to 'src/eval/Root.zig')
-rw-r--r--src/eval/Root.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/eval/Root.zig b/src/eval/Root.zig
index 1834dd0..fc59c1d 100644
--- a/src/eval/Root.zig
+++ b/src/eval/Root.zig
@@ -44,10 +44,7 @@ pub fn renderHTML(self: *Self, alloc: Allocator) HTML.Error![]const u8 {
fn html(context: *anyopaque, alloc: Allocator) HTML.Error!HTML {
const self: *Self = @ptrCast(@alignCast(context));
const el = try HTML.Root.init(alloc);
- errdefer el.deinit();
if (self.content.items.len == 0) return el.element();
- for (self.content.items) |it| {
- try el.append(try it.html(el.allocator()));
- }
+ for (self.content.items) |it| el.append(try it.html(el.allocator()));
return el.element();
}