diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-12-06 11:47:34 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-12-08 12:44:49 +0100 |
commit | de318ae8f13fcbe82ad545bb73b2c0a690e0ea15 (patch) | |
tree | 41bc7c34fe6769243f2bee73c501b130aca32f5e /components/script/parse/html.rs | |
parent | 5d0934d8ec7d3596d388549cc48daeffc7af73c3 (diff) | |
download | servo-de318ae8f13fcbe82ad545bb73b2c0a690e0ea15.tar.gz servo-de318ae8f13fcbe82ad545bb73b2c0a690e0ea15.zip |
Simplify the LoadData creation in parse_html.
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r-- | components/script/parse/html.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index b83743a450a..1bef0f21c91 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -217,11 +217,14 @@ pub fn parse_html(page: &Page, 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); - 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)); + resource_task.send(Load(LoadData { + url: url.clone(), + method: msg_load_data.method, + headers: msg_load_data.headers, + data: msg_load_data.data, + cors: None, + consumer: input_chan, + })); let load_response = input_port.recv(); |