mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #7397 - Manishearth:doublepointer-meet-fire, r=nox
Remove doublepointer in VirtualMethods, and from_borrowed_ref <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7397) <!-- Reviewable:end -->
This commit is contained in:
commit
48945b0fc1
34 changed files with 177 additions and 190 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}>> {
|
||||
|
@ -5839,11 +5831,6 @@ impl ${name}Cast {
|
|||
unsafe { mem::transmute(derived) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn from_borrowed_ref<'a, 'b, T: ${fromBound}+Reflectable>(derived: &'a &'b T) -> &'a &'b ${name} {
|
||||
unsafe { mem::transmute(derived) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn from_layout_js<T: ${fromBound}+Reflectable>(derived: &LayoutJS<T>) -> LayoutJS<${name}> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue