Skip to content

Commit 933c6c9

Browse files
committed
replace .boxed() with Box::pin
In futures 0.3.alpha15, the .boxed() helper added a Send trait bound. As we don't need that, use Box::pin instead. alpha16 will likely have a .boxed_local() helper. See also rust-lang/futures-rs#1563
1 parent 492d492 commit 933c6c9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/davhandler.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::sync::Arc;
99
use bytes;
1010

1111
use futures::compat::Stream01CompatExt;
12-
use futures::future::{FutureExt, TryFutureExt};
12+
use futures::future::TryFutureExt;
1313
use futures::stream::StreamExt;
1414
use futures01;
1515

@@ -250,7 +250,7 @@ impl DavInner {
250250
ReqBody: futures01::Stream<Item = bytes::Bytes, Error = ReqError> + Send,
251251
ReqError: StdError + Send + Sync + 'static,
252252
{
253-
async move {
253+
let fut = async move {
254254
let (req, body) = {
255255
let (parts, body) = req.into_parts();
256256
(Request::from_parts(parts, ()), body)
@@ -296,9 +296,8 @@ impl DavInner {
296296
Ok(resp)
297297
},
298298
}
299-
}
300-
.boxed()
301-
.compat()
299+
};
300+
Box::pin(fut).compat()
302301
}
303302

304303
// internal dispatcher part 2.

0 commit comments

Comments
 (0)