Merge pull request #112 from actix/master

-
This commit is contained in:
云上于天 2020-12-07 08:58:52 +08:00 committed by GitHub
commit a52546db6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,11 @@
# Changes # Changes
## Unreleased - 2020-xx-xx ## Unreleased - 2020-xx-xx
### Fixed
* added the actual parsing error to `test::read_body_json` [#1812]
[#1812]: https://github.com/actix/actix-web/pull/1812
## 3.3.2 - 2020-12-01 ## 3.3.2 - 2020-12-01

View File

@ -135,7 +135,7 @@ impl Service for RouteService {
} }
fn call(&mut self, req: ServiceRequest) -> Self::Future { fn call(&mut self, req: ServiceRequest) -> Self::Future {
self.service.call(req).boxed_local() self.service.call(req)
} }
} }

View File

@ -269,8 +269,9 @@ where
{ {
let body = read_body(res).await; let body = read_body(res).await;
serde_json::from_slice(&body) serde_json::from_slice(&body).unwrap_or_else(|e| {
.unwrap_or_else(|_| panic!("read_response_json failed during deserialization")) panic!("read_response_json failed during deserialization: {}", e)
})
} }
pub async fn load_stream<S>(mut stream: S) -> Result<Bytes, Error> pub async fn load_stream<S>(mut stream: S) -> Result<Bytes, Error>