aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/parse/html.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-12-06 11:39:45 +0100
committerMs2ger <ms2ger@gmail.com>2014-12-08 12:44:49 +0100
commit5d0934d8ec7d3596d388549cc48daeffc7af73c3 (patch)
tree157fb747ab7700de46edeac6d4d8c9698e4e79ab /components/script/parse/html.rs
parent69e13f3267e52d20ab87eccdd45583ad35ed0150 (diff)
downloadservo-5d0934d8ec7d3596d388549cc48daeffc7af73c3.tar.gz
servo-5d0934d8ec7d3596d388549cc48daeffc7af73c3.zip
Pass the load data to parse_html directly, rather than in an Option.
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r--components/script/parse/html.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs
index 70ffc76e6d9..b83743a450a 100644
--- a/components/script/parse/html.rs
+++ b/components/script/parse/html.rs
@@ -212,17 +212,15 @@ pub fn parse_html(page: &Page,
document: JSRef<Document>,
input: HTMLInput,
resource_task: ResourceTask,
- msg_load_data: Option<MsgLoadData>) {
+ msg_load_data: MsgLoadData) {
let (base_url, load_response) = match input {
InputUrl(ref url) => {
// Wait for the LoadResponse so that the parser knows the final URL.
let (input_chan, input_port) = channel();
let mut load_data = LoadData::new(url.clone(), input_chan);
- msg_load_data.map(|m| {
- load_data.headers = m.headers;
- load_data.method = m.method;
- load_data.data = m.data;
- });
+ load_data.headers = msg_load_data.headers;
+ load_data.method = msg_load_data.method;
+ load_data.data = msg_load_data.data;
resource_task.send(Load(load_data));
let load_response = input_port.recv();