From 7ce515f7f0d47066e2e1d7d51357797a5afbdadd Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 17 Oct 2023 10:05:25 -0700 Subject: [PATCH] remove NullResult from another spot --- web3_proxy/src/jsonrpc/response.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web3_proxy/src/jsonrpc/response.rs b/web3_proxy/src/jsonrpc/response.rs index 558fe9b7..2653399a 100644 --- a/web3_proxy/src/jsonrpc/response.rs +++ b/web3_proxy/src/jsonrpc/response.rs @@ -39,11 +39,6 @@ impl ParsedResponse { impl ParsedResponse> { pub fn from_response_data(data: ForwardedResponse>, id: Box) -> Self { match data { - ForwardedResponse::NullResult => { - let x: Box = Default::default(); - // TODO: how can we make this generic if this always wants to be a Box?. Do we even want to keep NullResult? - Self::from_result(Arc::from(x), id) - } ForwardedResponse::RpcError { error_data, .. } => Self::from_error(error_data, id), ForwardedResponse::Result { value, .. } => Self::from_result(value, id), } @@ -311,7 +306,7 @@ where Ok(Self::Parsed(val)) } - // TODO: error handling + /// TODO: rewrite this to go to a refactored version of ForwardedResponse. (And then rename ForwardedResponse to ParsedResponse cuz its a better name?) pub async fn parsed(self) -> Web3ProxyResult> { match self { Self::Parsed(resp, ..) => Ok(resp),