diff options
author | Pu Xingyu <pu.stshine@gmail.com> | 2016-11-18 12:39:22 +0800 |
---|---|---|
committer | Pu Xingyu <pu.stshine@gmail.com> | 2016-11-18 12:39:22 +0800 |
commit | 91f3d4f4749a1dd53d665f741be85559b820cbe7 (patch) | |
tree | 0170b480610acde6aa39867bdf581c4d6d352022 /components/script/script_thread.rs | |
parent | fb6cc15208690acb4c66445b71f2ff8d1dcfcf73 (diff) | |
download | servo-91f3d4f4749a1dd53d665f741be85559b820cbe7.tar.gz servo-91f3d4f4749a1dd53d665f741be85559b820cbe7.zip |
Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index a5452bc38ec..30462f3823b 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1239,7 +1239,7 @@ impl ScriptThread { let mut reports = vec![]; for (_, document) in self.documents.borrow().iter() { - let current_url = document.url().as_str(); + let current_url = document.url(); for child in document.upcast::<Node>().traverse_preorder() { dom_tree_size += heap_size_of_self_and_children(&*child); @@ -1249,10 +1249,10 @@ impl ScriptThread { if reports.len() > 0 { path_seg.push_str(", "); } - path_seg.push_str(current_url); + path_seg.push_str(current_url.as_str()); reports.push(Report { - path: path![format!("url({})", current_url), "dom-tree"], + path: path![format!("url({})", current_url.as_str()), "dom-tree"], kind: ReportKind::ExplicitJemallocHeapSize, size: dom_tree_size, }); |