From 9bb200a46f5b43898220b97f457f415abe1addc2 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 27 Oct 2023 18:02:44 +0200 Subject: [PATCH] dom: rename HTMLCollection._next() into get_next() We don't want expose the function to the JS API. --- src/dom/html_collection.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dom/html_collection.zig b/src/dom/html_collection.zig index 04e81fa9..cb54c032 100644 --- a/src/dom/html_collection.zig +++ b/src/dom/html_collection.zig @@ -27,7 +27,7 @@ pub const HTMLCollection = struct { // next iterates hover the DOM tree to return the next following node or // null at the end. - fn _next(root: *parser.Node, cur: *parser.Node) ?*parser.Node { + fn get_next(root: *parser.Node, cur: *parser.Node) ?*parser.Node { // TODO deinit next var next = parser.nodeFirstChild(cur); if (next != null) { @@ -86,7 +86,7 @@ pub const HTMLCollection = struct { } } - node = _next(self.root, node) orelse break; + node = get_next(self.root, node) orelse break; } return len; @@ -130,7 +130,7 @@ pub const HTMLCollection = struct { } } - node = _next(self.root, node) orelse break; + node = get_next(self.root, node) orelse break; } return null; @@ -174,7 +174,7 @@ pub const HTMLCollection = struct { } } - node = _next(self.root, node) orelse break; + node = get_next(self.root, node) orelse break; } return null;