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")]));