Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove the HttpRequest trait.
  • Loading branch information
Ms2ger committed Nov 24, 2016
1 parent fc6fa56 commit 87fd4a2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions components/net/http_loader.rs
Expand Up @@ -189,19 +189,11 @@ impl NetworkHttpRequestFactory {
}
}

trait HttpRequest {
type R: HttpResponse + 'static;

fn send(self, body: &Option<Vec<u8>>) -> Result<Self::R, LoadError>;
}

pub struct WrappedHttpRequest {
request: HyperRequest<Fresh>
}

impl HttpRequest for WrappedHttpRequest {
type R = WrappedHttpResponse;

impl WrappedHttpRequest {
fn send(self, body: &Option<Vec<u8>>) -> Result<WrappedHttpResponse, LoadError> {
let url = ServoUrl::from_url(self.request.url.clone());
let mut request_writer = match self.request.start() {
Expand Down

0 comments on commit 87fd4a2

Please sign in to comment.