diff --git a/crates/net/eth-wire/src/errors/eth.rs b/crates/net/eth-wire/src/errors/eth.rs index c988e7034..76859a55d 100644 --- a/crates/net/eth-wire/src/errors/eth.rs +++ b/crates/net/eth-wire/src/errors/eth.rs @@ -7,10 +7,6 @@ use std::io; #[derive(thiserror::Error, Debug)] #[allow(missing_docs)] pub enum EthStreamError { - #[error(transparent)] - Io(#[from] io::Error), - #[error(transparent)] - Rlp(#[from] reth_rlp::DecodeError), #[error(transparent)] P2PStreamError(#[from] P2PStreamError), #[error(transparent)] @@ -32,6 +28,18 @@ impl EthStreamError { } } +impl From for EthStreamError { + fn from(err: io::Error) -> Self { + P2PStreamError::from(err).into() + } +} + +impl From for EthStreamError { + fn from(err: reth_rlp::DecodeError) -> Self { + P2PStreamError::from(err).into() + } +} + /// Error variants that can occur during the `eth` sub-protocol handshake. #[derive(thiserror::Error, Debug)] #[allow(missing_docs)]