diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-27 01:07:34 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-27 02:14:48 +0530 |
commit | b33c5427bc350e42503e2de1a8f832c63522b2d0 (patch) | |
tree | 95c22ad6ae7e50ba07758f90ed0a6ce112debb32 /components/script/dom/htmlheadelement.rs | |
parent | 5e83a3f0a3bab226cca849ab33fa3322ef71813d (diff) | |
download | servo-b33c5427bc350e42503e2de1a8f832c63522b2d0.tar.gz servo-b33c5427bc350e42503e2de1a8f832c63522b2d0.zip |
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}"
```
Diffstat (limited to 'components/script/dom/htmlheadelement.rs')
-rw-r--r-- | components/script/dom/htmlheadelement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs index 0353ace6436..ce35a0e7286 100644 --- a/components/script/dom/htmlheadelement.rs +++ b/components/script/dom/htmlheadelement.rs @@ -46,12 +46,12 @@ impl HTMLHeadElement { } } -impl<'a> VirtualMethods for &'a HTMLHeadElement { +impl VirtualMethods for HTMLHeadElement { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> { - let htmlelement: &&HTMLElement = HTMLElementCast::from_borrowed_ref(self); + let htmlelement: &HTMLElement = HTMLElementCast::from_ref(self); Some(htmlelement as &VirtualMethods) } fn bind_to_tree(&self, _tree_in_doc: bool) { - load_script(*self); + load_script(self); } } |