chore: pre alloc on send raw (#14611)

This commit is contained in:
Matthias Seitz
2025-02-20 16:00:01 +01:00
committed by GitHub
parent 8d51c608ce
commit 09cf07d523

View File

@ -257,7 +257,7 @@ where
/// Sends a raw capability message directly over the stream
pub fn start_send_raw(&mut self, msg: RawCapabilityMessage) -> Result<(), EthStreamError> {
let mut bytes = Vec::new();
let mut bytes = Vec::with_capacity(msg.payload.len() + 1);
msg.id.encode(&mut bytes);
bytes.extend_from_slice(&msg.payload);