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:
commit
9818e0b3c0
@ -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))
|
||||
})
|
||||
|
@ -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))
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user