diff --git a/servo/src/components/script/html/hubbub_html_parser.rs b/servo/src/components/script/html/hubbub_html_parser.rs index a53acea4115b..8b7ee5440b73 100644 --- a/servo/src/components/script/html/hubbub_html_parser.rs +++ b/servo/src/components/script/html/hubbub_html_parser.rs @@ -319,7 +319,7 @@ pub fn parse_html(page: &Page, debug!("Fetched page; metadata is {:?}", load_response.metadata); - let base_url = load_response.metadata.final_url.clone(); + let base_url = &load_response.metadata.final_url; { // Store the final URL before we start parsing, so that DOM routines @@ -414,7 +414,7 @@ pub fn parse_html(page: &Page, s.as_slice().eq_ignore_ascii_case("stylesheet") }) => { debug!("found CSS stylesheet: {:s}", *href); - match UrlParser::new().base_url(&base_url).parse(href.as_slice()) { + match UrlParser::new().base_url(base_url).parse(href.as_slice()) { Ok(url) => css_chan2.send(CSSTaskNewFile( UrlProvenance(url, resource_task.clone()))), Err(e) => debug!("Parsing url {:s} failed: {:s}", *href, e) @@ -498,7 +498,7 @@ pub fn parse_html(page: &Page, match script.get_attribute(Null, "src").root() { Some(src) => { debug!("found script: {:s}", src.deref().Value()); - match UrlParser::new().base_url(&base_url) + match UrlParser::new().base_url(base_url) .parse(src.deref().value().as_slice()) { Ok(new_url) => js_chan2.send(JSTaskNewFile(new_url)), Err(e) => debug!("Parsing url {:s} failed: {:s}", src.deref().Value(), e)