From 0d21c2da220575306f52fe5d728cc41d5d228bfb Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 26 Dec 2017 21:07:51 -0800 Subject: [PATCH] various typos --- guide/src/qs_14.md | 8 ++++---- guide/src/qs_4.md | 2 +- guide/src/qs_9.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/guide/src/qs_14.md b/guide/src/qs_14.md index 6c6fd1aaa..e9e489be7 100644 --- a/guide/src/qs_14.md +++ b/guide/src/qs_14.md @@ -31,7 +31,7 @@ struct CreateUser { } ``` -We can send `CreateUser` message to `DbExecutor` actor, and as result we can get +We can send `CreateUser` message to `DbExecutor` actor, and as result we get `User` model. Now we need to define actual handler implementation for this message. ```rust,ignore @@ -69,7 +69,7 @@ All we need is to start *DbExecutor* actors and store address in a state where h can access it. ```rust,ignore -/// This is state where we store *DbExecutor* address. +/// This is state where we will store *DbExecutor* address. struct State { db: SyncAddress, } @@ -77,7 +77,7 @@ struct State { fn main() { let sys = actix::System::new("diesel-example"); - // Start 3 db executors + // Start 3 parallele db executors let addr = SyncArbiter::start(3, || { DbExecutor(SqliteConnection::establish("test.db").unwrap()) }); @@ -94,7 +94,7 @@ fn main() { } ``` -And finally we can use this state in a requst handler. We get message response +And finally we can use address in a requst handler. We get message response asynchronously, so handler needs to return future object, also `Route::a()` needs to be used for async handler registration. diff --git a/guide/src/qs_4.md b/guide/src/qs_4.md index e44483d07..1a82d51bd 100644 --- a/guide/src/qs_4.md +++ b/guide/src/qs_4.md @@ -122,7 +122,7 @@ from multiple threads consider using [actix](https://actix.github.io/actix/actix ## Response with custom type -To return custom type directly from handler function type needs to implement `Responder` trait. +To return custom type directly from handler function, type needs to implement `Responder` trait. Let's create response for custom type that serializes to `application/json` response: ```rust diff --git a/guide/src/qs_9.md b/guide/src/qs_9.md index 4f0b38cc8..aa8bfd5f6 100644 --- a/guide/src/qs_9.md +++ b/guide/src/qs_9.md @@ -3,7 +3,7 @@ Actix supports WebSockets out-of-the-box. It is possible to convert request's `Payload` to a stream of [*ws::Message*](../actix_web/ws/enum.Message.html) with a [*ws::WsStream*](../actix_web/ws/struct.WsStream.html) and then use stream -combinators to handle actual messages. But it is simplier to handle websocket communication +combinators to handle actual messages. But it is simplier to handle websocket communications with http actor. ```rust