mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
remove to_borrowed_ref, fix Activatable
This commit is contained in:
parent
b33c5427bc
commit
4678ec16bb
4 changed files with 18 additions and 26 deletions
|
@ -5807,14 +5807,6 @@ impl ${name}Cast {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn to_borrowed_ref<'a, 'b, T: ${toBound}+Reflectable>(base: &'a &'b T) -> Option<&'a &'b ${name}> {
|
||||
match base.${checkFn}() {
|
||||
true => Some(unsafe { mem::transmute(base) }),
|
||||
false => None
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn to_layout_js<T: ${toBound}+Reflectable>(base: &LayoutJS<T>) -> Option<LayoutJS<${name}>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue