not unwraping, and passing err over requester
This commit is contained in:
parent
1d0e9c379b
commit
61242718e9
@ -11,7 +11,7 @@ impl Requester {
|
|||||||
where
|
where
|
||||||
T: DeserializeOwned,
|
T: DeserializeOwned,
|
||||||
{
|
{
|
||||||
let body = req.collect().await.unwrap().to_bytes();
|
let body = req.collect().await?.to_bytes();
|
||||||
Ok(serde_json::from_slice(&body)?)
|
Ok(serde_json::from_slice(&body)?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user