mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove doublepointer in VirtualMethods, and from_borrowed_ref
Most of the heavy lifting done by: ``` $ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}' $ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}" ```
This commit is contained in:
parent
5e83a3f0a3
commit
b33c5427bc
34 changed files with 159 additions and 164 deletions
|
@ -5839,11 +5839,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