1
0
mirror of https://github.com/actix/actix-website synced 2025-02-02 04:09:06 +01:00

Merge pull request #168 from actix/fix/app-data

fix extraction in app state extract examples
This commit is contained in:
Rob Ede 2020-04-06 03:26:27 +01:00 committed by GitHub
commit 9818e0b3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
App::new()
.app_data(data.clone())
.data(data.clone())
.route("/", web::to(show_count))
.route("/add", web::to(add_one))
})

View File

@ -29,7 +29,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
App::new()
.app_data(data.clone())
.data(data.clone())
.route("/", web::to(show_count))
.route("/add", web::to(add_one))
})