Skip to content

Commit

Permalink
remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed Apr 17, 2024
1 parent a54cb3a commit 7eb4649
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions protocols/v2/framing-sv2/src/framing2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ pub struct NoiseFrame {
/// todo
pub type HandShakeFrame = NoiseFrame;

/// todo (why unreachable?)
#[cfg(feature = "with_buffer_pool")]
impl<A> From<EitherFrame<A, Vec<u8>>> for Sv2Frame<A, buffer_sv2::Slice> {
fn from(_: EitherFrame<A, Vec<u8>>) -> Self {
unreachable!()
}
}

impl NoiseFrame {
/// Returns payload of `NoiseFrame` as a `Vec<u8>`
pub fn get_payload_when_handshaking(&self) -> Vec<u8> {
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 7eb4649

Please sign in to comment.