mirror of
https://github.com/actix/examples
synced 2025-06-29 02:10:36 +02:00
upgrade example to actix-web 0.7
This commit is contained in:
@ -22,11 +22,11 @@ use db::{CreateUser, DbExecutor};
|
||||
|
||||
/// State with DbExecutor address
|
||||
struct State {
|
||||
db: Addr<Syn, DbExecutor>,
|
||||
db: Addr<DbExecutor>,
|
||||
}
|
||||
|
||||
/// Async request handler
|
||||
fn index(req: HttpRequest<State>) -> Box<Future<Item = HttpResponse, Error = Error>> {
|
||||
fn index(req: &HttpRequest<State>) -> Box<Future<Item = HttpResponse, Error = Error>> {
|
||||
let name = &req.match_info()["name"];
|
||||
|
||||
req.state()
|
||||
|
Reference in New Issue
Block a user