aboutsummaryrefslogtreecommitdiff
path: root/src/eval/Title.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 17:45:13 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 17:45:13 +0200
commit3b0e9424a66058da82d11d432da886ec7b6ce7eb (patch)
tree0ad906e3b7d945405cdfeb9ff95b02546e1ed4bb /src/eval/Title.zig
parentef5c0341ca15f6862294802103b02992b29609e8 (diff)
perf(eval): reduce memory syscall
Diffstat (limited to 'src/eval/Title.zig')
-rw-r--r--src/eval/Title.zig12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/eval/Title.zig b/src/eval/Title.zig
index 2e89953..ebb7fa2 100644
--- a/src/eval/Title.zig
+++ b/src/eval/Title.zig
@@ -15,17 +15,7 @@ pub fn init(alloc: Allocator, level: u3, content: Parent) !*Self {
}
pub fn element(self: *Self) Parent {
- return .{ .ptr = self, .vtable = .{ .deinit = destroy, .html = html } };
-}
-
-pub fn deinit(self: *Self, alloc: Allocator) void {
- self.element().deinit(alloc);
-}
-
-fn destroy(context: *anyopaque, alloc: Allocator) void {
- var self: *Self = @ptrCast(@alignCast(context));
- self.content.deinit(alloc);
- alloc.destroy(self);
+ return .{ .ptr = self, .vtable = .{ .html = html } };
}
fn html(context: *anyopaque, alloc: Allocator) HTML.Error!HTML {