From 2ba06d65a3b9c96602dfe8062874259d7e0f8b25 Mon Sep 17 00:00:00 2001 From: tivrfoa Date: Sat, 27 Jun 2020 11:26:06 -0300 Subject: [PATCH] Fix example on README.md It was missing the actix-rt dependency. Also it's actix_rt::main, and not actix_web::main. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ade632877..11848c51d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Dependencies: ```toml [dependencies] +actix-rt = "1" actix-web = "2" ``` @@ -65,7 +66,7 @@ async fn index(info: web::Path<(u32, String)>) -> impl Responder { format!("Hello {}! id:{}", info.1, info.0) } -#[actix_web::main] +#[actix_rt::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| App::new().service(index)) .bind("127.0.0.1:8080")?