Skip to content

Commit

Permalink
Remove StreamedResponse::new().
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Nov 24, 2016
1 parent 4d9f9fe commit c20d647
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/net/http_loader.rs
Expand Up @@ -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) => {
Expand All @@ -415,7 +411,7 @@ impl StreamedResponse {
Decoder::Plain(response)
}
};
Ok(StreamedResponse::new(decoder))
Ok(StreamedResponse { decoder: decoder })
}
}

Expand Down

0 comments on commit c20d647

Please sign in to comment.