From 7eb4649b21e009dbdfaf0f51d2976cfcbd73fbe1 Mon Sep 17 00:00:00 2001 From: plebhash Date: Wed, 17 Apr 2024 15:34:34 -0300 Subject: [PATCH] remove unused functions --- protocols/v2/framing-sv2/src/framing2.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/protocols/v2/framing-sv2/src/framing2.rs b/protocols/v2/framing-sv2/src/framing2.rs index 48b9b688b0..bed2f73dff 100644 --- a/protocols/v2/framing-sv2/src/framing2.rs +++ b/protocols/v2/framing-sv2/src/framing2.rs @@ -98,14 +98,6 @@ pub struct NoiseFrame { /// todo pub type HandShakeFrame = NoiseFrame; -/// todo (why unreachable?) -#[cfg(feature = "with_buffer_pool")] -impl From>> for Sv2Frame { - fn from(_: EitherFrame>) -> Self { - unreachable!() - } -} - impl NoiseFrame { /// Returns payload of `NoiseFrame` as a `Vec` pub fn get_payload_when_handshaking(&self) -> Vec { @@ -242,12 +234,6 @@ impl<'a, T: Serialize + GetSize, B: AsMut<[u8]> + AsRef<[u8]>> Frame<'a, T> for } } -#[inline] -pub fn build_noise_frame_header(frame: &mut [u8], len: u16) { - frame[0] = len.to_le_bytes()[0]; - frame[1] = len.to_le_bytes()[1]; -} - impl<'a> Frame<'a, Slice> for NoiseFrame { type Buffer = Slice; type Deserialized = &'a mut [u8];