Pass a borrowed Url to parse_html.

It does not need to take ownership, and I want to reuse final_url in the
caller.
This commit is contained in:
Ms2ger 2014-12-09 15:11:58 +01:00
parent 8838f2460e
commit 795327d5c4
2 changed files with 2 additions and 2 deletions

View file

@ -163,7 +163,7 @@ impl<'a> TreeSink<TrustedNodeAddress> for servohtmlparser::Sink {
pub fn parse_html(document: JSRef<Document>,
input: HTMLInput,
url: Url) {
url: &Url) {
let parser = ServoHTMLParser::new(Some(url.clone()), document).root();
let parser: JSRef<ServoHTMLParser> = *parser;

View file

@ -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);