From 795327d5c4984957af7720a91159f91f9162be62 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 9 Dec 2014 15:11:58 +0100 Subject: [PATCH] Pass a borrowed Url to parse_html. It does not need to take ownership, and I want to reuse final_url in the caller. --- components/script/parse/html.rs | 2 +- components/script/script_task.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index c629305e931..e4980fd6a1c 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -163,7 +163,7 @@ impl<'a> TreeSink for servohtmlparser::Sink { pub fn parse_html(document: JSRef, input: HTMLInput, - url: Url) { + url: &Url) { let parser = ServoHTMLParser::new(Some(url.clone()), document).root(); let parser: JSRef = *parser; diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 6a213c14b54..c778d2792fc 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -781,7 +781,7 @@ impl ScriptTask { (InputString(strval.unwrap_or("".to_string())), doc_url) }; - parse_html(*document, parser_input, final_url); + parse_html(*document, parser_input, &final_url); url = page.get_url().clone(); document.set_ready_state(DocumentReadyStateValues::Interactive);