Fix lint error
This commit is contained in:
@ -19,9 +19,9 @@ impl<T: Serialize> IntoResponse for BaseResponse<T> {
|
|||||||
|
|
||||||
impl DeserializeInto for Response {
|
impl DeserializeInto for Response {
|
||||||
async fn deserialize_into<T: DeserializeOwned>(self) -> Result<T, serde_json::Error> {
|
async fn deserialize_into<T: DeserializeOwned>(self) -> Result<T, serde_json::Error> {
|
||||||
let body = to_bytes(self.into_body(), usize::MAX).await.map_err(|e| {
|
let body = to_bytes(self.into_body(), usize::MAX)
|
||||||
serde_json::Error::custom(format!("Failed to read response body: {}", e))
|
.await
|
||||||
})?;
|
.map_err(|e| serde_json::Error::custom(format!("Failed to read response body: {e}")))?;
|
||||||
serde_json::from_slice(&body)
|
serde_json::from_slice(&body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user