From 076e1dd7e56efd0c878a24b4fb4af46ab2950622 Mon Sep 17 00:00:00 2001 From: komuhangi <51232461+jahielkomu@users.noreply.github.com> Date: Sun, 31 Mar 2024 17:07:40 +0300 Subject: [PATCH] Update node.rs Removed the ```# Safety ``` section. --- components/script/layout_dom/node.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs index 2b30f678a09..c780170bf74 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -97,9 +97,7 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType phantom: PhantomData, } } - /// # Safety - /// - /// This function should not be called if there is no TrustedNodeAddress. + pub unsafe fn new(address: &TrustedNodeAddress) -> Self { ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address)) }