1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

update examples

This commit is contained in:
Nikolay Kim
2018-03-30 23:37:15 -07:00
parent 44e3df82f6
commit 7a743fa6b5
11 changed files with 28 additions and 33 deletions

View File

@ -11,8 +11,7 @@ use std::cell::Cell;
use actix::prelude::*;
use actix_web::{
http, server, ws, middleware,
Application, HttpRequest, HttpResponse, Error};
http, server, ws, middleware, Application, HttpRequest, HttpResponse};
/// Application state
struct AppState {
@ -20,7 +19,7 @@ struct AppState {
}
/// simple handle
fn index(req: HttpRequest<AppState>) -> Result<HttpResponse, Error> {
fn index(req: HttpRequest<AppState>) -> HttpResponse {
println!("{:?}", req);
req.state().counter.set(req.state().counter.get() + 1);