We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e810df9 commit b453779Copy full SHA for b453779
1 file changed
crates/net/eth-wire/src/multiplex.rs
@@ -332,9 +332,9 @@ impl ProtocolProxy {
332
return Ok(msg);
333
}
334
335
- let mut masked = Vec::from(msg);
+ let mut masked: BytesMut = msg.into();
336
masked[0] = masked[0].checked_add(offset).ok_or(io::ErrorKind::InvalidInput)?;
337
- Ok(masked.into())
+ Ok(masked.freeze())
338
339
340
/// Unmasks the message ID of a message received from the wire.
0 commit comments