Skip to content

Commit ee4a707

Browse files
committed
fix ci on master
1 parent 06bf5f7 commit ee4a707

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

examples/nested.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
use async_std::task;
2-
3-
fn main() -> Result<(), std::io::Error> {
4-
task::block_on(async {
5-
let mut app = tide::new();
6-
app.at("/").get(|_| async move { "Root" });
7-
app.at("/api").nest({
8-
let mut api = tide::new();
9-
api.at("/hello").get(|_| async move { "Hello, world" });
10-
api.at("/goodbye").get(|_| async move { "Goodbye, world" });
11-
api
12-
});
13-
app.listen("127.0.0.1:8080").await?;
14-
Ok(())
15-
})
1+
#[async_std::main]
2+
async fn main() -> Result<(), std::io::Error> {
3+
let mut app = tide::new();
4+
app.at("/").get(|_| async move { Ok("Root") });
5+
app.at("/api").nest({
6+
let mut api = tide::new();
7+
api.at("/hello").get(|_| async move { Ok("Hello, world") });
8+
api.at("/goodbye").get(|_| async move { Ok("Goodbye, world") });
9+
api
10+
});
11+
app.listen("127.0.0.1:8080").await?;
12+
Ok(())
1613
}

0 commit comments

Comments
 (0)