chore(client): adjust dispatch giver throughput benchmark generics
This commit is contained in:
		| @@ -281,20 +281,21 @@ mod tests { | |||||||
|     #[cfg(feature = "nightly")] |     #[cfg(feature = "nightly")] | ||||||
|     #[bench] |     #[bench] | ||||||
|     fn giver_queue_throughput(b: &mut test::Bencher) { |     fn giver_queue_throughput(b: &mut test::Bencher) { | ||||||
|         let (mut tx, mut rx) = super::channel::<i32, ()>(); |         use {Body, Request, Response}; | ||||||
|  |         let (mut tx, mut rx) = super::channel::<Request<Body>, Response<Body>>(); | ||||||
|  |  | ||||||
|         b.iter(move || { |         b.iter(move || { | ||||||
|             ::futures::future::lazy(|| { |             ::futures::future::lazy(|| { | ||||||
|                 let _ = tx.send(1).unwrap(); |                 let _ = tx.send(Request::default()).unwrap(); | ||||||
|                 loop { |                 loop { | ||||||
|                     let async = rx.poll().unwrap(); |                     let ok = rx.poll().unwrap(); | ||||||
|                     if async.is_not_ready() { |                     if ok.is_not_ready() { | ||||||
|                         break; |                         break; | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  |  | ||||||
|                 Ok::<(), ()>(()) |                 Ok::<_, ()>(()) | ||||||
|             }).wait().unwrap(); |             }).wait().unwrap(); | ||||||
|         }) |         }) | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user