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

@ -18,7 +18,7 @@ use util::resource_files::resources_dir_path;
pub fn load_script(head: &HTMLHeadElement) {
if let Some(ref path_str) = opts::get().userscripts {
let node = NodeCast::from_borrowed_ref(&head);
let node = NodeCast::from_ref(head);
let first_child = node.GetFirstChild();
let doc = node.owner_doc();
let doc = doc.r();
@ -45,8 +45,8 @@ pub fn load_script(head: &HTMLHeadElement) {
let new_script = doc.CreateElement("script".to_owned()).unwrap();
let new_script = new_script.r();
new_script.set_string_attribute(&atom!("src"), name);
let new_script_node = NodeCast::from_borrowed_ref(&new_script);
node.InsertBefore(*new_script_node, first_child.r()).unwrap();
let new_script_node = NodeCast::from_ref(new_script);
node.InsertBefore(new_script_node, first_child.r()).unwrap();
}
}
}