1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-20 08:31:09 +00:00

add Derev<Target=RequestHead> for ClientRequest

This commit is contained in:
Nikolay Kim 2019-04-01 10:26:25 -07:00
parent 96fd61f3d5
commit 6c195d8521
2 changed files with 22 additions and 0 deletions

View file

@ -1,5 +1,13 @@
# Changes
## [0.1.0-alpha.3] - 2019-04-xx
### Added
* Added `Deref<Target = RequestHead>` for `ClientRequest`.
## [0.1.0-alpha.2] - 2019-03-29
### Added

View file

@ -554,6 +554,20 @@ impl ClientRequest {
}
}
impl std::ops::Deref for ClientRequest {
type Target = RequestHead;
fn deref(&self) -> &RequestHead {
&self.head
}
}
impl std::ops::DerefMut for ClientRequest {
fn deref_mut(&mut self) -> &mut RequestHead {
&mut self.head
}
}
impl fmt::Debug for ClientRequest {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(