Skip to content

Commit

Permalink
Remove unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde committed Sep 17, 2024
1 parent ef7dd51 commit 0257f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ReqwestTransport {
R: for<'a> serde::de::Deserialize<'a>,
{
let response = self.client.post(self.url.clone()).json(&req).send().await?;
Ok(response.json().await?)
response.json().await
}
}

Expand All @@ -30,7 +30,7 @@ impl Transport for ReqwestTransport {
&self,
r: jsonrpc_async::Request<'_>,
) -> Result<jsonrpc_async::Response, jsonrpc_async::Error> {
Ok(self.request(r).await.unwrap())
Ok(self.request(r).await.map_err(|e| jsonrpc_async::Error::Transport(e.into()))?)
}

async fn send_batch(
Expand Down

0 comments on commit 0257f6e

Please sign in to comment.