Skip to content

Commit 4ee86c7

Browse files
committed
Response: impl AsRef and AsMut to http::Response
Refs: #465
1 parent 37c1762 commit 4ee86c7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/response.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ impl Response {
262262
}
263263
}
264264

265+
impl AsMut<http::Response> for Response {
266+
fn as_mut(&mut self) -> &mut http::Response {
267+
&mut self.res
268+
}
269+
}
270+
271+
impl AsRef<http::Response> for Response {
272+
fn as_ref(&self) -> &http::Response {
273+
&self.res
274+
}
275+
}
276+
265277
impl Into<http::Response> for Response {
266278
fn into(self) -> http_types::Response {
267279
self.res

0 commit comments

Comments
 (0)