mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
html_collection: explicitely list switch cases
This commit is contained in:
@@ -19,14 +19,16 @@ const Matcher = union(enum) {
|
||||
pub fn match(self: Matcher, node: *parser.Node) !bool {
|
||||
switch (self) {
|
||||
inline .matchTrue => return true,
|
||||
inline else => |case| return case.match(node),
|
||||
inline .matchByTagName => |case| return case.match(node),
|
||||
inline .matchByClassName => |case| return case.match(node),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn deinit(self: Matcher, alloc: std.mem.Allocator) void {
|
||||
switch (self) {
|
||||
.matchTrue => return,
|
||||
inline else => |case| return case.deinit(alloc),
|
||||
inline .matchTrue => return,
|
||||
inline .matchByTagName => |case| return case.deinit(alloc),
|
||||
inline .matchByClassName => |case| return case.deinit(alloc),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user