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:
Manish Goregaokar 2015-08-27 01:07:34 +05:30
parent 5e83a3f0a3
commit b33c5427bc
34 changed files with 159 additions and 164 deletions

View file

@ -2553,9 +2553,9 @@ pub fn window_from_node<T: NodeBase + Reflectable>(derived: &T) -> Root<Window>
document.r().window()
}
impl<'a> VirtualMethods for &'a Node {
impl VirtualMethods for Node {
fn super_type(&self) -> Option<&VirtualMethods> {
let eventtarget: &&EventTarget = EventTargetCast::from_borrowed_ref(self);
let eventtarget: &EventTarget = EventTargetCast::from_ref(self);
Some(eventtarget as &VirtualMethods)
}