File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -203,26 +203,16 @@ mod test_stream_adapter {
203
203
}
204
204
}
205
205
206
- /// Works with a concrete service stack (no boxing)
207
206
#[ test]
208
- fn stream_adapter_with_concrete_stack ( ) {
209
- let _svc = ServiceBuilder :: new ( )
207
+ fn stream_adapter_is_boxable ( ) {
208
+ // Works with a concrete service stack (no boxing)
209
+ let svc = ServiceBuilder :: new ( )
210
210
. layer_fn ( |service| LogService { inner : service } )
211
211
. layer_fn ( StreamAdapter :: from)
212
212
. service_fn (
213
213
|_req : Request | async move { http:: Response :: builder ( ) . status ( StatusCode :: OK ) . body ( Body :: Empty ) } ,
214
214
) ;
215
- }
216
-
217
- /// Also works when the stack is boxed (type-erased)
218
- #[ test]
219
- fn stream_adapter_with_boxed_stack ( ) {
220
- let _svc = ServiceBuilder :: new ( )
221
- . layer_fn ( |service| LogService { inner : service } )
222
- . layer_fn ( StreamAdapter :: from)
223
- . service_fn (
224
- |_req : Request | async move { http:: Response :: builder ( ) . status ( StatusCode :: OK ) . body ( Body :: Empty ) } ,
225
- )
226
- . boxed ( ) ;
215
+ // Also works when the stack is boxed (type-erased)
216
+ let _boxed_svc = svc. boxed ( ) ;
227
217
}
228
218
}
You can’t perform that action at this time.
0 commit comments