aboutsummaryrefslogtreecommitdiff
path: root/src/eval/list.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/list.zig')
-rw-r--r--src/eval/list.zig15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/eval/list.zig b/src/eval/list.zig
index 08f180a..06b7af7 100644
--- a/src/eval/list.zig
+++ b/src/eval/list.zig
@@ -18,21 +18,10 @@ fn List(comptime tag: []const u8) type {
}
pub fn element(self: *Self) Element {
- return .{ .ptr = self, .vtable = .{ .deinit = destroy, .html = html } };
+ return .{ .ptr = self, .vtable = .{ .html = html } };
}
- pub fn deinit(self: *Self, alloc: Allocator) void {
- destroy(self, alloc);
- }
-
- fn destroy(context: *anyopaque, alloc: Allocator) void {
- var self: *Self = @ptrCast(@alignCast(context));
- for (self.content.items) |it| it.deinit(alloc);
- self.content.deinit(alloc);
- alloc.destroy(self);
- }
-
- fn html(context: *anyopaque, alloc: Allocator) HTML.Error!HTML {
+ fn html(context: *anyopaque, alloc: Allocator) HTML.Error!HTML {
const self: *Self = @ptrCast(@alignCast(context));
var el = try HTML.Content.init(alloc, tag);
for (self.content.items) |it| {