1
1
use conduit:: { box_error, Body , Handler , HandlerResult , RequestExt , Response , StatusCode } ;
2
- use futures :: prelude :: * ;
2
+ use futures_util :: future :: { Future , FutureExt } ;
3
3
use hyper:: { body:: to_bytes, service:: Service } ;
4
4
5
5
use super :: service:: { BlockingHandler , ServiceError } ;
@@ -150,7 +150,7 @@ async fn limits_thread_count() {
150
150
let first = service. call ( hyper:: Request :: default ( ) ) ;
151
151
let second = service. call ( hyper:: Request :: default ( ) ) ;
152
152
153
- let first_completed = futures :: select! {
153
+ let first_completed = futures_util :: select! {
154
154
// The first thead is spawned and sleeps for 100ms
155
155
sleep = first. fuse( ) => sleep,
156
156
// The second request is rejected immediately
@@ -171,7 +171,7 @@ async fn sleeping_doesnt_block_another_request() {
171
171
let start = std:: time:: Instant :: now ( ) ;
172
172
173
173
// Spawn 2 requests that each sleeps for 100ms
174
- let ( first, second) = futures :: join!( first, second) ;
174
+ let ( first, second) = futures_util :: join!( first, second) ;
175
175
176
176
// Elapsed time should be closer to 100ms than 200ms
177
177
assert ! ( start. elapsed( ) . as_millis( ) < 150 ) ;
0 commit comments