not unwraping, and passing err over requester

This commit is contained in:
midefos 2025-01-23 16:06:44 +01:00
parent 1d0e9c379b
commit 61242718e9

View File

@ -11,7 +11,7 @@ impl Requester {
where
T: DeserializeOwned,
{
let body = req.collect().await.unwrap().to_bytes();
let body = req.collect().await?.to_bytes();
Ok(serde_json::from_slice(&body)?)
}
}