1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 01:32:57 +01:00

add more comments

This commit is contained in:
Nikolay Kim 2017-12-18 16:30:35 -08:00
parent fde94bfe95
commit 625c4ad0db

View File

@ -26,11 +26,12 @@ use diesel::prelude::*;
mod models; mod models;
mod schema; mod schema;
/// State with DbExecutor address
struct State { struct State {
db: SyncAddress<DbExecutor>, db: SyncAddress<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"]; let name = &req.match_info()["name"];