mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Simplify the LoadData creation in parse_html.
This commit is contained in:
parent
5d0934d8ec
commit
de318ae8f1
1 changed files with 8 additions and 5 deletions
|
@ -217,11 +217,14 @@ pub fn parse_html(page: &Page,
|
||||||
InputUrl(ref url) => {
|
InputUrl(ref url) => {
|
||||||
// Wait for the LoadResponse so that the parser knows the final URL.
|
// Wait for the LoadResponse so that the parser knows the final URL.
|
||||||
let (input_chan, input_port) = channel();
|
let (input_chan, input_port) = channel();
|
||||||
let mut load_data = LoadData::new(url.clone(), input_chan);
|
resource_task.send(Load(LoadData {
|
||||||
load_data.headers = msg_load_data.headers;
|
url: url.clone(),
|
||||||
load_data.method = msg_load_data.method;
|
method: msg_load_data.method,
|
||||||
load_data.data = msg_load_data.data;
|
headers: msg_load_data.headers,
|
||||||
resource_task.send(Load(load_data));
|
data: msg_load_data.data,
|
||||||
|
cors: None,
|
||||||
|
consumer: input_chan,
|
||||||
|
}));
|
||||||
|
|
||||||
let load_response = input_port.recv();
|
let load_response = input_port.recv();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue