mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Generate from_layout_js() conversion methods
This commit is contained in:
parent
c8f41b473c
commit
45b490c977
1 changed files with 6 additions and 0 deletions
|
@ -5427,6 +5427,12 @@ impl ${name}Cast {
|
|||
unsafe { derived.transmute_borrowed() }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn from_layout_js<T: ${fromBound}+Reflectable>(derived: &LayoutJS<T>) -> LayoutJS<${name}> {
|
||||
unsafe { derived.transmute_copy() }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn from_temporary<T: ${fromBound}+Reflectable>(derived: Temporary<T>) -> Temporary<${name}> {
|
||||
unsafe { derived.transmute() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue