Make ServoLayoutNode::new return a free lifetime value

Binding the scope of the ServoLayoutNode value to the originating
TrustedNodeAddress is just theater.
This commit is contained in:
Anthony Ramine 2020-03-27 17:03:52 +01:00
parent df0118dd10
commit 400c7012b1
2 changed files with 2 additions and 2 deletions

View file

@ -138,7 +138,7 @@ impl<'ln> ServoLayoutNode<'ln> {
}
}
pub unsafe fn new(address: &TrustedNodeAddress) -> ServoLayoutNode {
pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address))
}

View file

@ -145,7 +145,7 @@ impl<'ln> ServoLayoutNode<'ln> {
}
}
pub unsafe fn new(address: &TrustedNodeAddress) -> ServoLayoutNode {
pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address))
}