Update node.rs

Removed the  ```# Safety ``` section.
This commit is contained in:
komuhangi 2024-03-31 17:07:40 +03:00 committed by GitHub
parent 5dc4980807
commit 076e1dd7e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,9 +97,7 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType
phantom: PhantomData, phantom: PhantomData,
} }
} }
/// # Safety
///
/// This function should not be called if there is no TrustedNodeAddress.
pub unsafe fn new(address: &TrustedNodeAddress) -> Self { pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address)) ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address))
} }