Skip to content

Commit

Permalink
ConduitRequest: Inline parts() method (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 authored Nov 11, 2021
1 parent 8025264 commit 8943fac
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/adaptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,15 @@ impl ConduitRequest {
body: Cursor::new(body),
}
}

fn parts(&self) -> &HttpParts {
&self.parts
}
}

impl RequestExt for ConduitRequest {
fn http_version(&self) -> Version {
self.parts().version
self.parts.version
}

fn method(&self) -> &Method {
&self.parts().method
&self.parts.method
}

/// Always returns Http
Expand Down Expand Up @@ -108,7 +104,7 @@ impl RequestExt for ConduitRequest {
}

fn query_string(&self) -> Option<&str> {
self.parts().uri.query()
self.parts.uri.query()
}

fn body(&mut self) -> &mut dyn Read {
Expand Down

0 comments on commit 8943fac

Please sign in to comment.