From c831bd5c3554b12f3b76c6ec358ef673c5e84ddd Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 26 Mar 2023 14:10:21 -0400 Subject: [PATCH] *Add impl From<()> for HttpClientError --- ethers-providers/src/transports/http.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ethers-providers/src/transports/http.rs b/ethers-providers/src/transports/http.rs index ad473c0e..600edaf1 100644 --- a/ethers-providers/src/transports/http.rs +++ b/ethers-providers/src/transports/http.rs @@ -91,6 +91,15 @@ impl From> for ClientError { } } } +impl From<()> for HttpClientError { + fn from(_: ()) -> Self { + HttpClientError::JsonRpcError(JsonRpcError { + code: 0, + message: "".to_string(), + data: None, + }) + } +} #[cfg_attr(target_arch = "wasm32", async_trait(?Send))] #[cfg_attr(not(target_arch = "wasm32"), async_trait)]