Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the http_loader code. #14362

Merged
merged 14 commits into from Nov 26, 2016

Remove StreamedResponse::metadata.

  • Loading branch information
Ms2ger committed Nov 24, 2016
commit 4d9f9feb1c74be8100692f1180a4c2fb1e311e2e
@@ -373,7 +373,6 @@ fn set_cookies_from_headers(url: &ServoUrl, headers: &Headers, cookie_jar: &Arc<

struct StreamedResponse {
decoder: Decoder,
pub metadata: Metadata
}


@@ -390,8 +389,8 @@ impl Read for StreamedResponse {
}

impl StreamedResponse {
fn new(m: Metadata, d: Decoder) -> StreamedResponse {
StreamedResponse { metadata: m, decoder: d }
fn new(d: Decoder) -> StreamedResponse {
StreamedResponse { decoder: d }
}

pub fn from_http_response(response: WrappedHttpResponse, m: Metadata) -> Result<StreamedResponse, LoadError> {
@@ -416,7 +415,7 @@ impl StreamedResponse {
Decoder::Plain(response)
}
};
Ok(StreamedResponse::new(m, decoder))
Ok(StreamedResponse::new(decoder))
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.