1
0
mirror of https://github.com/actix/examples synced 2025-06-28 09:50: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

@ -2,11 +2,10 @@
name = "state"
version = "2.0.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
workspace = ".."
edition = "2018"
[dependencies]
actix-web = "2.0.0-alpha.6"
actix-web = "2.0.0-rc"
actix-rt = "1.0.0"
futures = "0.3.1"
env_logger = "0.6"

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