diff --git a/rpc/src/eth.rs b/rpc/src/eth.rs index 668b4175e8..7380f39ae3 100644 --- a/rpc/src/eth.rs +++ b/rpc/src/eth.rs @@ -261,7 +261,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentBlock") ) ) { - return Decode::decode(&mut &block_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &block_data.0[..]).unwrap()); } else { return None; }; } @@ -272,7 +272,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses") ) ) { - return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &status_data.0[..]).unwrap()); } else { return None; }; } @@ -283,7 +283,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentReceipts") ) ) { - return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &status_data.0[..]).unwrap()); } else { return None; }; } }