Skip to content

Commit 8943fac

Browse files
authored
ConduitRequest: Inline parts() method (#34)
1 parent 8025264 commit 8943fac

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/adaptor.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,15 @@ impl ConduitRequest {
4141
body: Cursor::new(body),
4242
}
4343
}
44-
45-
fn parts(&self) -> &HttpParts {
46-
&self.parts
47-
}
4844
}
4945

5046
impl RequestExt for ConduitRequest {
5147
fn http_version(&self) -> Version {
52-
self.parts().version
48+
self.parts.version
5349
}
5450

5551
fn method(&self) -> &Method {
56-
&self.parts().method
52+
&self.parts.method
5753
}
5854

5955
/// Always returns Http
@@ -108,7 +104,7 @@ impl RequestExt for ConduitRequest {
108104
}
109105

110106
fn query_string(&self) -> Option<&str> {
111-
self.parts().uri.query()
107+
self.parts.uri.query()
112108
}
113109

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

0 commit comments

Comments
 (0)