From 06ec9a16f510562b074e8c18e5bcf38fdcc84f22 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 20 Nov 2023 16:34:13 +0100 Subject: [PATCH] dom: remove useless error union on document.getElementsBy* --- src/dom/document.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom/document.zig b/src/dom/document.zig index 83f17893..b012eb37 100644 --- a/src/dom/document.zig +++ b/src/dom/document.zig @@ -50,12 +50,12 @@ pub const Document = struct { // the spec changed to return an HTMLCollection instead. // That's why we reimplemented getElementsByTagName by using an // HTMLCollection in zig here. - pub fn _getElementsByTagName(self: *parser.Document, tag_name: []const u8) !collection.HTMLCollection { + pub fn _getElementsByTagName(self: *parser.Document, tag_name: []const u8) collection.HTMLCollection { const root = parser.documentGetDocumentElement(self); return collection.HTMLCollectionByTagName(parser.elementToNode(root), tag_name); } - pub fn _getElementsByClassName(self: *parser.Document, classNames: []const u8) !collection.HTMLCollection { + pub fn _getElementsByClassName(self: *parser.Document, classNames: []const u8) collection.HTMLCollection { const root = parser.documentGetDocumentElement(self); return collection.HTMLCollectionByClassName(parser.elementToNode(root), classNames); }