File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -3,27 +3,21 @@ use bytes::Bytes;
3
3
use googletest:: prelude:: * ;
4
4
use serde_json:: Value ;
5
5
use std:: marker:: PhantomData ;
6
- use std:: ops:: Deref ;
7
6
use std:: str:: from_utf8;
8
7
9
8
use crate :: rate_limiter:: LimitedAction ;
9
+ use derive_more:: Deref ;
10
10
use http:: { header, StatusCode } ;
11
11
12
12
/// A type providing helper methods for working with responses
13
+ #[ derive( Deref ) ]
13
14
#[ must_use]
14
15
pub struct Response < T > {
16
+ #[ deref]
15
17
response : hyper:: Response < Bytes > ,
16
18
return_type : PhantomData < T > ,
17
19
}
18
20
19
- impl Deref for Response < ( ) > {
20
- type Target = hyper:: Response < Bytes > ;
21
-
22
- fn deref ( & self ) -> & Self :: Target {
23
- & self . response
24
- }
25
- }
26
-
27
21
impl < T > Response < T >
28
22
where
29
23
for < ' de > T : serde:: Deserialize < ' de > ,
You can’t perform that action at this time.
0 commit comments