1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

Fix typos

This commit is contained in:
Matthijs Brobbel
2018-05-30 12:05:23 +02:00
parent 4d41d40da2
commit c1b432cb97
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ fn index(_req: HttpRequest) -> Box<Future<Item = HttpResponse, Error = Error>> {
.map_err(Error::from) // <- convert SendRequestError to an Error
.and_then(
|resp| resp.body() // <- this is MessageBody type, resolves to complete body
.from_err() // <- convert PayloadError to a Error
.from_err() // <- convert PayloadError to an Error
.and_then(|body| { // <- we got complete body, now send as server response
Ok(HttpResponse::Ok().body(body))
}))
@ -34,7 +34,7 @@ fn streaming(_req: HttpRequest) -> Box<Future<Item = HttpResponse, Error = Error
.and_then(|resp| { // <- we received client response
Ok(HttpResponse::Ok()
// read one chunk from client response and send this chunk to a server response
// .from_err() converts PayloadError to a Error
// .from_err() converts PayloadError to an Error
.body(Body::Streaming(Box::new(resp.from_err()))))
})
.responder()