1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

update actix web to stable version

This commit is contained in:
Rob Ede
2022-02-25 21:07:22 +00:00
parent c3a74c6823
commit 4dc9199781
61 changed files with 144 additions and 150 deletions

View File

@ -6,4 +6,4 @@ edition = "2021"
[dependencies]
env_logger = "0.9.0"
tera = "1.8.0"
actix-web = "4.0.0-beta.21"
actix-web = "4"

View File

@ -15,8 +15,8 @@ async fn index(
let s = if let Some(name) = query.get("name") {
// submitted form
let mut ctx = tera::Context::new();
ctx.insert("name", &name.to_owned());
ctx.insert("text", &"Welcome!".to_owned());
ctx.insert("name", name);
ctx.insert("text", "Welcome!");
tmpl.render("user.html", &ctx)
.map_err(|_| error::ErrorInternalServerError("Template error"))?
} else {