diff --git a/async_ex1/src/main.rs b/async_ex1/src/main.rs index dda193f9..95e02fc6 100644 --- a/async_ex1/src/main.rs +++ b/async_ex1/src/main.rs @@ -70,7 +70,7 @@ fn step_x_v1(data: SomeData) -> Box> { .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| { let resp: HttpBinResponse = serde_json::from_slice(&body).unwrap(); fut_ok(resp.json) @@ -109,7 +109,7 @@ fn step_x_v2(data: SomeData) -> impl Future { .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| { let resp: HttpBinResponse = serde_json::from_slice(&body).unwrap(); fut_ok(resp.json) diff --git a/http-proxy/src/main.rs b/http-proxy/src/main.rs index 64adfbcf..2e750870 100644 --- a/http-proxy/src/main.rs +++ b/http-proxy/src/main.rs @@ -17,7 +17,7 @@ fn index(_req: HttpRequest) -> Box> { .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