From a5ad90adc44711d1b5f433584fd0547c425c2a2b Mon Sep 17 00:00:00 2001 From: noriaki watanabe Date: Thu, 12 Jun 2025 07:30:46 +0900 Subject: [PATCH] Make create_element a static method since it doesn't use self --- core/src/renderer/html/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/renderer/html/parser.rs b/core/src/renderer/html/parser.rs index 475b8a5..fae1059 100644 --- a/core/src/renderer/html/parser.rs +++ b/core/src/renderer/html/parser.rs @@ -63,7 +63,7 @@ impl HtmlParser { } /// Creates an element node. - fn create_element(&self, tag: &str, attributes: Vec) -> Node { + fn create_element(tag: &str, attributes: Vec) -> Node { Node::new(NodeKind::Element(Element::new(tag, attributes))) } @@ -77,7 +77,7 @@ impl HtmlParser { None => window.document(), }; - let node = Rc::new(RefCell::new(self.create_element(tag, attributes))); + let node = Rc::new(RefCell::new(Self::create_element(tag, attributes))); if current.borrow().first_child().is_some() { let mut last_sibling = current.borrow().first_child();