From cfe3933e6c0dc76b697700987ba14ab2d26037b4 Mon Sep 17 00:00:00 2001 From: Christopher Jarville Date: Fri, 17 Jun 2022 10:25:02 -0600 Subject: [PATCH] Fixed code example in README A call to the `format!` macro was implying the use of a named argument called `name` in the format string, but the argument wasn't specified. I fixed this by using the simple {} notation in the format string and passing the `name` variable as a second argument. --- actix-web/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actix-web/README.md b/actix-web/README.md index 3fd0108ce..9aaf0d6b1 100644 --- a/actix-web/README.md +++ b/actix-web/README.md @@ -58,7 +58,7 @@ use actix_web::{get, web, App, HttpServer, Responder}; #[get("/hello/{name}")] async fn greet(name: web::Path) -> impl Responder { - format!("Hello {name}!") + format!("Hello {}!", name) } #[actix_web::main] // or #[tokio::main]