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

rename web::State to web::Data

This commit is contained in:
Nikolay Kim
2019-03-16 20:23:09 -07:00
parent 14eed91fcd
commit b31c8e3308
8 changed files with 23 additions and 23 deletions

View File

@ -10,7 +10,7 @@ use uuid;
/// Async request handler. Ddb pool is stored in application state.
fn index(
path: web::Path<String>,
db: web::State<Pool<SqliteConnectionManager>>,
db: web::Data<Pool<SqliteConnectionManager>>,
) -> impl Future<Item = HttpResponse, Error = Error> {
// execute sync code in threadpool
web::block(move || {