Skip to content

Commit d17b4f0

Browse files
Nemo157yoshuawuyts
authored andcommitted
Update for futures alpha.17 (#286)
1 parent a74cc28 commit d17b4f0

File tree

21 files changed

+26
-33
lines changed

21 files changed

+26
-33
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cors = ["tide-cors"]
2525
hyper = ["http-service-hyper"]
2626

2727
[dependencies]
28-
futures-preview = "0.3.0-alpha.16"
28+
futures-preview = "0.3.0-alpha.17"
2929
http = "0.1"
3030
http-service = "0.2.0"
3131
http-service-hyper = { version = "0.2.0", optional = true }
@@ -46,7 +46,7 @@ bytes = "0.4.12"
4646
cookie = { version = "0.12", features = ["percent-encode"] }
4747
env_logger = "0.6.1"
4848
futures-fs = "0.0.5"
49-
futures-util-preview = { version = "0.3.0-alpha.16", features = ["compat"] }
49+
futures-util-preview = { version = "0.3.0-alpha.17", features = ["compat"] }
5050
http-service-mock = "0.2.0"
5151
juniper = "0.12.0"
5252
log = "0.4.6"

src/app.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use futures::future::{self, BoxFuture};
2-
use futures::prelude::*;
32
use http_service::HttpService;
43
use std::sync::Arc;
54

@@ -297,7 +296,7 @@ impl<State: Sync + Send + 'static> HttpService for Server<State> {
297296
let middleware = self.middleware.clone();
298297
let state = self.state.clone();
299298

300-
FutureExt::boxed(async move {
299+
Box::pin(async move {
301300
let fut = {
302301
let (endpoint, params) = router.route(&path, method).into_components();
303302
let cx = Context::new(state, req, params);

src/router/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'a, State> Selection<'a, State> {
6969
}
7070

7171
fn not_found_endpoint<State>(_cx: Context<State>) -> BoxFuture<'static, Response> {
72-
FutureExt::boxed(async move {
72+
Box::pin(async move {
7373
http::Response::builder()
7474
.status(http::StatusCode::NOT_FOUND)
7575
.body(Body::empty())

tide-compression/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ version = "0.1.0"
1717
tide = { path = "../", default-features = false }
1818
accept-encoding = "0.2.0-alpha.2"
1919
bytes = "0.4.12"
20-
futures-preview = "0.3.0-alpha.16"
20+
futures-preview = "0.3.0-alpha.17"
2121
http = "0.1"
2222
http-service = "0.2.0"
2323

tide-compression/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
pub use accept_encoding::Encoding;
1616
use async_compression::stream;
1717
use futures::future::BoxFuture;
18-
use futures::prelude::*;
1918
use http::{header::CONTENT_ENCODING, status::StatusCode, HeaderMap};
2019
use http_service::{Body, Request};
2120
use tide::{
@@ -134,7 +133,7 @@ impl Compression {
134133

135134
impl<State: Send + Sync + 'static> Middleware<State> for Compression {
136135
fn handle<'a>(&'a self, cx: Context<State>, next: Next<'a, State>) -> BoxFuture<'a, Response> {
137-
FutureExt::boxed(async move {
136+
Box::pin(async move {
138137
let encoding = match self.preferred_encoding(cx.headers()) {
139138
Ok(encoding) => encoding,
140139
Err(e) => return e.into_response(),
@@ -222,7 +221,7 @@ impl<State: Send + Sync + 'static> Middleware<State> for Decompression {
222221
mut cx: Context<State>,
223222
next: Next<'a, State>,
224223
) -> BoxFuture<'a, Response> {
225-
FutureExt::boxed(async move {
224+
Box::pin(async move {
226225
match self.decode(cx.request_mut()) {
227226
Ok(_) => (),
228227
Err(e) => return e.into_response(),

tide-cookies/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/rustasync/tide"
1212

1313
[dependencies]
1414
cookie = { version = "0.12", features = ["percent-encode"] }
15-
futures-preview = "0.3.0-alpha.16"
15+
futures-preview = "0.3.0-alpha.17"
1616
http = "0.1"
1717
http-service = "0.2.0"
1818
tide-core = { path = "../tide-core", default-features = false }

tide-cookies/src/middleware.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::data::CookieData;
22
use futures::future::BoxFuture;
3-
use futures::prelude::*;
43
use http::header::HeaderValue;
54

65
use tide_core::{
@@ -36,7 +35,7 @@ impl<State: Send + Sync + 'static> Middleware<State> for CookiesMiddleware {
3635
mut cx: Context<State>,
3736
next: Next<'a, State>,
3837
) -> BoxFuture<'a, Response> {
39-
FutureExt::boxed(async move {
38+
Box::pin(async move {
4039
let cookie_data = cx
4140
.extensions_mut()
4241
.remove()

tide-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
1111
repository = "https://github.com/rustasync/tide"
1212

1313
[dependencies]
14-
futures-preview = "0.3.0-alpha.16"
14+
futures-preview = "0.3.0-alpha.17"
1515
http = "0.1"
1616
http-service = "0.2.0"
1717
serde = "1.0.91"

tide-core/src/endpoint.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use futures::future::{BoxFuture, Future};
2-
use futures::prelude::*;
32

43
use crate::{error::Error, response::IntoResponse, Context, Response};
54

@@ -66,7 +65,7 @@ where
6665
type Fut = BoxFuture<'static, Response>;
6766
fn call(&self, cx: Context<State>) -> Self::Fut {
6867
let fut = (self)(cx);
69-
FutureExt::boxed(async move { fut.await.into_response() })
68+
Box::pin(async move { fut.await.into_response() })
7069
}
7170
}
7271

tide-cors/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2018"
1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

1616
[dependencies]
17-
futures-preview = "0.3.0-alpha.16"
17+
futures-preview = "0.3.0-alpha.17"
1818
http = "0.1"
1919
http-service = "0.2.0"
2020
tide-core = { path = "../tide-core" }

0 commit comments

Comments
 (0)