mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove LoadConsumer::Listener.
This commit is contained in:
parent
e8d9546035
commit
40c711bf97
2 changed files with 1 additions and 12 deletions
|
@ -137,7 +137,7 @@ pub fn start_sending_sniffed_opt(start_chan: LoadConsumer, mut metadata: Metadat
|
|||
/// It takes an optional NetworkError, so that we can extract the SSL Validation errors
|
||||
/// and take it to the HTML parser
|
||||
fn start_sending_opt(start_chan: LoadConsumer, metadata: Metadata,
|
||||
network_error: Option<NetworkError>) -> Result<ProgressSender, ()> {
|
||||
_network_error: Option<NetworkError>) -> Result<ProgressSender, ()> {
|
||||
match start_chan {
|
||||
LoadConsumer::Channel(start_chan) => {
|
||||
let (progress_chan, progress_port) = ipc::channel().unwrap();
|
||||
|
@ -150,16 +150,6 @@ fn start_sending_opt(start_chan: LoadConsumer, metadata: Metadata,
|
|||
Err(_) => Err(())
|
||||
}
|
||||
}
|
||||
LoadConsumer::Listener(target) => {
|
||||
match network_error {
|
||||
Some(NetworkError::SslValidation(url, reason)) => {
|
||||
let error = NetworkError::SslValidation(url, reason);
|
||||
target.invoke_with_listener(ResponseAction::HeadersAvailable(Err(error)));
|
||||
}
|
||||
_ => target.invoke_with_listener(ResponseAction::HeadersAvailable(Ok(metadata))),
|
||||
}
|
||||
Ok(ProgressSender::Listener(target))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,6 @@ impl AsyncResponseTarget {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum LoadConsumer {
|
||||
Channel(IpcSender<LoadResponse>),
|
||||
Listener(AsyncResponseTarget),
|
||||
}
|
||||
|
||||
/// Handle to a resource thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue