1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

use actix 0.5 release

This commit is contained in:
Nikolay Kim
2018-02-17 13:33:38 -08:00
parent 3e3d3279b8
commit 0da382a7a4
14 changed files with 15 additions and 18 deletions

View File

@ -72,7 +72,7 @@ can access it.
```rust,ignore
/// This is state where we will store *DbExecutor* address.
struct State {
db: SyncAddress<DbExecutor>,
db: Addr<Syn, DbExecutor>,
}
fn main() {
@ -106,7 +106,7 @@ fn index(req: HttpRequest<State>) -> Box<Future<Item=HttpResponse, Error=Error>>
let name = &req.match_info()["name"];
// Send message to `DbExecutor` actor
req.state().db.call_fut(CreateUser{name: name.to_owned()})
req.state().db.send(CreateUser{name: name.to_owned()})
.from_err()
.and_then(|res| {
match res {