diff --git a/protocols/gossipsub/src/error.rs b/protocols/gossipsub/src/error.rs index 2fbfe93ebaca..a6a961a62bb7 100644 --- a/protocols/gossipsub/src/error.rs +++ b/protocols/gossipsub/src/error.rs @@ -137,7 +137,7 @@ impl std::error::Error for ValidationError {} impl From for GossipsubHandlerError { fn from(error: std::io::Error) -> GossipsubHandlerError { - GossipsubHandlerError::Codec(prost_codec::Error::Io(error)) + GossipsubHandlerError::Codec(prost_codec::Error::from(error)) } }