File tree 3 files changed +2
-54
lines changed
3 files changed +2
-54
lines changed Original file line number Diff line number Diff line change @@ -108,22 +108,6 @@ impl tower::Service<RequestPacket> for PubSubFrontend {
108
108
type Error = TransportError ;
109
109
type Future = TransportFut < ' static > ;
110
110
111
- #[ inline]
112
- fn poll_ready ( & mut self , cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
113
- ( & * self ) . poll_ready ( cx)
114
- }
115
-
116
- #[ inline]
117
- fn call ( & mut self , req : RequestPacket ) -> Self :: Future {
118
- ( & * self ) . call ( req)
119
- }
120
- }
121
-
122
- impl tower:: Service < RequestPacket > for & PubSubFrontend {
123
- type Response = ResponsePacket ;
124
- type Error = TransportError ;
125
- type Future = TransportFut < ' static > ;
126
-
127
111
#[ inline]
128
112
fn poll_ready ( & mut self , _cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
129
113
let result =
Original file line number Diff line number Diff line change @@ -154,34 +154,13 @@ where
154
154
type Error = TransportError ;
155
155
type Future = TransportFut < ' static > ;
156
156
157
- #[ inline]
158
- fn poll_ready ( & mut self , cx : & mut task:: Context < ' _ > ) -> task:: Poll < Result < ( ) , Self :: Error > > {
159
- ( & * self ) . poll_ready ( cx)
160
- }
161
-
162
- #[ inline]
163
- fn call ( & mut self , req : RequestPacket ) -> Self :: Future {
164
- ( & * self ) . call ( req)
165
- }
166
- }
167
-
168
- impl < B , S > Service < RequestPacket > for & Http < HyperClient < B , S > >
169
- where
170
- S : Service < Request < B > , Response = HyperResponse > + Clone + Send + Sync + ' static ,
171
- S :: Future : Send ,
172
- S :: Error : std:: error:: Error + Send + Sync + ' static ,
173
- B : From < Vec < u8 > > + Send + ' static + Clone + Sync ,
174
- {
175
- type Response = ResponsePacket ;
176
- type Error = TransportError ;
177
- type Future = TransportFut < ' static > ;
178
-
179
157
#[ inline]
180
158
fn poll_ready ( & mut self , _cx : & mut task:: Context < ' _ > ) -> task:: Poll < Result < ( ) , Self :: Error > > {
181
159
// `hyper` always returns `Ok(())`.
182
160
task:: Poll :: Ready ( Ok ( ( ) ) )
183
161
}
184
162
163
+ #[ inline]
185
164
fn call ( & mut self , req : RequestPacket ) -> Self :: Future {
186
165
let this = self . clone ( ) ;
187
166
let span = debug_span ! ( "HyperTransport" , url = %this. url) ;
Original file line number Diff line number Diff line change @@ -74,28 +74,13 @@ impl Service<RequestPacket> for Http<reqwest::Client> {
74
74
type Error = TransportError ;
75
75
type Future = TransportFut < ' static > ;
76
76
77
- #[ inline]
78
- fn poll_ready ( & mut self , cx : & mut task:: Context < ' _ > ) -> task:: Poll < Result < ( ) , Self :: Error > > {
79
- ( & * self ) . poll_ready ( cx)
80
- }
81
-
82
- #[ inline]
83
- fn call ( & mut self , req : RequestPacket ) -> Self :: Future {
84
- ( & * self ) . call ( req)
85
- }
86
- }
87
-
88
- impl Service < RequestPacket > for & Http < reqwest:: Client > {
89
- type Response = ResponsePacket ;
90
- type Error = TransportError ;
91
- type Future = TransportFut < ' static > ;
92
-
93
77
#[ inline]
94
78
fn poll_ready ( & mut self , _cx : & mut task:: Context < ' _ > ) -> task:: Poll < Result < ( ) , Self :: Error > > {
95
79
// `reqwest` always returns `Ok(())`.
96
80
task:: Poll :: Ready ( Ok ( ( ) ) )
97
81
}
98
82
83
+ #[ inline]
99
84
fn call ( & mut self , req : RequestPacket ) -> Self :: Future {
100
85
let this = self . clone ( ) ;
101
86
let span = debug_span ! ( "ReqwestTransport" , url = %this. url) ;
You can’t perform that action at this time.
0 commit comments