Skip to content

Commit

Permalink
Map error like before
Browse files Browse the repository at this point in the history
  • Loading branch information
nloadholtes committed Nov 3, 2022
1 parent cf5808d commit edae8f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl Decoder for GossipsubCodec {
type Error = GossipsubHandlerError;

fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, GossipsubHandlerError> {
let rpc = match self.codec.decode(src) {
let rpc = match self.codec.decode(src).map_err(GossipsubHandlerError::Codec) {
Ok(Some(p)) => p,
_ => return Ok(None),
};
Expand Down

0 comments on commit edae8f3

Please sign in to comment.