mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
df0118dd10
commit
400c7012b1
2 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue