From 61242718e939dd0c11f02e33288c1fa499c9635c Mon Sep 17 00:00:00 2001 From: midefos Date: Thu, 23 Jan 2025 16:06:44 +0100 Subject: [PATCH] not unwraping, and passing err over requester --- src/requester.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requester.rs b/src/requester.rs index ef614f5..5de29a4 100644 --- a/src/requester.rs +++ b/src/requester.rs @@ -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)?) } }