From 3e031bdaf8da146bbc0e2bca6db0edca75c20d0c Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 6 Dec 2014 15:39:45 +0100 Subject: Make parse_html's base_url argument non-optional. It turns out the case where it woul be None can't happen. --- components/script/script_task.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'components/script/script_task.rs') diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 688a89757c2..b36f7733a98 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -728,7 +728,7 @@ impl ScriptTask { } else { url.clone() }; - let document = Document::new(*window, Some(doc_url), HTMLDocument, + let document = Document::new(*window, Some(doc_url.clone()), HTMLDocument, None, FromParser).root(); window.init_browser_context(*document); @@ -783,13 +783,10 @@ impl ScriptTask { *page.mut_url() = Some((base_url.clone(), true)); } - (Some(base_url), Some(load_response)) + (base_url, Some(load_response)) }, InputString(_) => { - match *page.url() { - Some((ref page_url, _)) => (Some(page_url.clone()), None), - None => (None, None), - } + (doc_url, None) }, }; -- cgit v1.2.3