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:
parent
fde94bfe95
commit
625c4ad0db
@ -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"];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user