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::new().

  • Loading branch information
Ms2ger committed Nov 24, 2016
commit c20d647b612649e5bbdc33b27bab82109bbfee7b
@@ -389,10 +389,6 @@ impl Read for StreamedResponse {
}

impl StreamedResponse {
fn new(d: Decoder) -> StreamedResponse {
StreamedResponse { decoder: d }
}

pub fn from_http_response(response: WrappedHttpResponse, m: Metadata) -> Result<StreamedResponse, LoadError> {
let decoder = match response.content_encoding() {
Some(Encoding::Gzip) => {
@@ -415,7 +411,7 @@ impl StreamedResponse {
Decoder::Plain(response)
}
};
Ok(StreamedResponse::new(decoder))
Ok(StreamedResponse { decoder: decoder })
}
}

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