mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-30 10:42:55 +01:00
add Derev<Target=RequestHead> for ClientRequest
This commit is contained in:
parent
96fd61f3d5
commit
6c195d8521
@ -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
|
||||
|
@ -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!(
|
||||
|
Loading…
Reference in New Issue
Block a user