Skip to content

Commit e7703fd

Browse files
committed
rustfmt
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 6637aaf commit e7703fd

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

tide-cookies/src/middleware.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::data::CookieData;
22
use futures::future::BoxFuture;
3-
use http::header::HeaderValue;
43
use futures::prelude::*;
4+
use http::header::HeaderValue;
55

66
use tide_core::{
77
middleware::{Middleware, Next},

tide-core/src/endpoint.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ where
6969
type Fut = BoxFuture<'static, Response>;
7070
fn call(&self, cx: Context<State>) -> Self::Fut {
7171
let fut = (self)(cx);
72-
FutureExt::boxed(async move {
73-
fut.await.into_response()
74-
})
72+
FutureExt::boxed(async move { fut.await.into_response() })
7573
}
7674
}

tide-core/src/router.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ impl<State: 'static> Router<State> {
6464

6565
fn not_found_endpoint<Data>(_cx: Context<Data>) -> BoxFuture<'static, Response> {
6666
FutureExt::boxed(async move {
67-
http::Response::builder().status(http::StatusCode::NOT_FOUND).body(Body::empty()).unwrap()
67+
http::Response::builder()
68+
.status(http::StatusCode::NOT_FOUND)
69+
.body(Body::empty())
70+
.unwrap()
6871
})
6972
}

tide/src/forms.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use futures::prelude::*;
12
use http_service::Body;
23
use multipart::server::Multipart;
3-
use futures::prelude::*;
44
use std::io::Cursor;
55

66
use crate::{
@@ -22,7 +22,9 @@ impl<State: Send + Sync + 'static> ExtractForms for Context<State> {
2222
let body = self.take_body();
2323
FutureExt::boxed(async move {
2424
let body = body.into_vec().await.client_err()?;
25-
Ok(serde_urlencoded::from_bytes(&body).map_err(|e| err_fmt!("could not decode form: {}", e)).client_err()?)
25+
Ok(serde_urlencoded::from_bytes(&body)
26+
.map_err(|e| err_fmt!("could not decode form: {}", e))
27+
.client_err()?)
2628
})
2729
}
2830

@@ -38,7 +40,9 @@ impl<State: Send + Sync + 'static> ExtractForms for Context<State> {
3840

3941
FutureExt::boxed(async move {
4042
let body = body.into_vec().await.client_err()?;
41-
let boundary = boundary.ok_or_else(|| err_fmt!("no boundary found")).client_err()?;
43+
let boundary = boundary
44+
.ok_or_else(|| err_fmt!("no boundary found"))
45+
.client_err()?;
4246
Ok(Multipart::with_body(Cursor::new(body), boundary))
4347
})
4448
}

0 commit comments

Comments
 (0)