1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

re-export actix_rt::main macro (#1559)

This commit is contained in:
Rob Ede
2020-06-18 15:45:30 +01:00
committed by GitHub
parent 0ba73fc44c
commit dc74db1f2f
7 changed files with 10 additions and 6 deletions

View File

@ -53,7 +53,6 @@ Dependencies:
```toml
[dependencies]
actix-web = "2"
actix-rt = "1"
```
Code:
@ -66,7 +65,7 @@ async fn index(info: web::Path<(u32, String)>) -> impl Responder {
format!("Hello {}! id:{}", info.1, info.0)
}
#[actix_rt::main]
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index))
.bind("127.0.0.1:8080")?