mirror of
https://github.com/actix/actix-web.git
synced 2025-01-06 23:35:29 +00:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
d573cf2d97
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ We have to define sync actor and connection that this actor will use. Same appro
|
||||||
could be used for other databases.
|
could be used for other databases.
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
use actix::prelude::*;*
|
use actix::prelude::*;
|
||||||
|
|
||||||
struct DbExecutor(SqliteConnection);
|
struct DbExecutor(SqliteConnection);
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ We can send `CreateUser` message to `DbExecutor` actor, and as result we get
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
impl Handler<CreateUser> for DbExecutor {
|
impl Handler<CreateUser> for DbExecutor {
|
||||||
type Result = Result<User, Error>
|
type Result = Result<User, Error>;
|
||||||
|
|
||||||
fn handle(&mut self, msg: CreateUser, _: &mut Self::Context) -> Self::Result
|
fn handle(&mut self, msg: CreateUser, _: &mut Self::Context) -> Self::Result
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue