1
0
mirror of https://github.com/actix/examples synced 2025-06-29 02:10:36 +02:00

update dependencies

This commit is contained in:
Nikolay Kim
2019-12-20 22:30:26 +06:00
parent 7b35cd32c7
commit d914b1c694
42 changed files with 70 additions and 80 deletions

View File

@ -1,4 +1,3 @@
#![allow(clippy::needless_pass_by_value)]
//! Application may have multiple data objects that are shared across
//! all handlers within same Application. Data could be added
//! with `App::data()` method, multiple different data objects could be added.
@ -34,7 +33,7 @@ async fn main() -> io::Result<()> {
//move is necessary to give closure below ownership of counter
HttpServer::new(move || {
App::new()
.register_data(counter.clone()) // <- create app with shared state
.app_data(counter.clone()) // <- create app with shared state
// enable logger
.wrap(middleware::Logger::default())
// register simple handler, handle all methods