From a3cd3633d8d0ac3f3a8a541ff3d3fd5f227c5cce Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 26 Jun 2019 12:16:20 +0800 Subject: [PATCH] Use dyn Trait feature in examples & tests (#553) --- examples/async_stream.rs | 2 +- tests/async.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/async_stream.rs b/examples/async_stream.rs index 3081483..f233cb5 100644 --- a/examples/async_stream.rs +++ b/examples/async_stream.rs @@ -51,7 +51,7 @@ where File::open(path.as_ref().to_owned()) .map_err(|err| println!("request error: {}", err)) .and_then(|file| { - let source: Box + Send> = + let source: Box + Send> = Box::new(FileSource::new(file)); Client::new() diff --git a/tests/async.rs b/tests/async.rs index b36d929..ecbd681 100644 --- a/tests/async.rs +++ b/tests/async.rs @@ -239,7 +239,7 @@ fn gzip_case(response_size: usize, chunk_size: usize) { fn body_stream() { let _ = env_logger::try_init(); - let source: Box + Send> + let source: Box + Send> = Box::new(futures::stream::iter_ok::<_, io::Error>( vec![Bytes::from_static(b"123"), Bytes::from_static(b"4567")]));