Skip to content

Commit b311fcc

Browse files
committed
chore: run rustfmt on code
1 parent 383b581 commit b311fcc

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

examples/body_types.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ use tide::body;
66

77
#[derive(Serialize, Deserialize, Clone, Debug)]
88
struct Message {
9-
author: Option<String>,
10-
contents: String,
9+
author: Option<String>,
10+
contents: String,
1111
}
1212

1313
async fn echo_string(msg: String) -> String {
14-
println!("String: {}", msg);
15-
format!("{}", msg)
14+
println!("String: {}", msg);
15+
format!("{}", msg)
1616
}
1717

1818
async fn echo_vec(msg: Vec<u8>) -> String {
19-
println!("Vec<u8>: {:?}", msg);
19+
println!("Vec<u8>: {:?}", msg);
2020

21-
String::from_utf8(msg).unwrap()
21+
String::from_utf8(msg).unwrap()
2222
}
2323

2424
async fn echo_json(msg: body::Json<Message>) -> body::Json<Message> {
25-
println!("JSON: {:?}", msg.0);
25+
println!("JSON: {:?}", msg.0);
2626

27-
msg
27+
msg
2828
}
2929

3030
fn main() {
31-
let mut app = tide::App::new(());
32-
app.at("/echo/string").post(echo_string);
33-
app.at("/echo/vec").post(echo_vec);
34-
app.at("/echo/json").post(echo_json);
35-
app.serve("127.0.0.1:8000");
31+
let mut app = tide::App::new(());
32+
app.at("/echo/string").post(echo_string);
33+
app.at("/echo/vec").post(echo_vec);
34+
app.at("/echo/json").post(echo_json);
35+
app.serve("127.0.0.1:8000");
3636
}

examples/named_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(async_await, futures_api)]
22

3-
use tide::head::{NamedComponent, Named};
3+
use tide::head::{Named, NamedComponent};
44

55
struct Number(i32);
66

src/body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<T: 'static + Send + serde::Serialize> IntoResponse for Json<T> {
148148
}
149149
}
150150

151-
impl <S: 'static> Extract<S> for String {
151+
impl<S: 'static> Extract<S> for String {
152152
type Fut = FutureObj<'static, Result<Self, Response>>;
153153

154154
fn extract(
@@ -167,7 +167,7 @@ impl <S: 'static> Extract<S> for String {
167167
}
168168
}
169169

170-
impl <S: 'static> Extract<S> for Vec<u8> {
170+
impl<S: 'static> Extract<S> for Vec<u8> {
171171
type Fut = FutureObj<'static, Result<Self, Response>>;
172172

173173
fn extract(

0 commit comments

Comments
 (0)