Skip to content

Commit

Permalink
tls-codec: clippy fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Jan 27, 2025
1 parent 603273c commit e4f3875
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tls_codec/src/quic_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,30 +387,30 @@ impl Size for &VLBytes {

pub struct VLByteSlice<'a>(pub &'a [u8]);

impl<'a> fmt::Debug for VLByteSlice<'a> {
impl fmt::Debug for VLByteSlice<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "VLByteSlice {{ ")?;
write_hex(f, self.0)?;
write!(f, " }}")
}
}

impl<'a> VLByteSlice<'a> {
impl VLByteSlice<'_> {
/// Get the raw slice.
#[inline(always)]
pub fn as_slice(&self) -> &[u8] {
self.0
}
}

impl<'a> Size for &VLByteSlice<'a> {
impl Size for &VLByteSlice<'_> {
#[inline]
fn tls_serialized_len(&self) -> usize {
tls_serialize_bytes_len(self.0)
}
}

impl<'a> Size for VLByteSlice<'a> {
impl Size for VLByteSlice<'_> {
#[inline]
fn tls_serialized_len(&self) -> usize {
tls_serialize_bytes_len(self.0)
Expand Down Expand Up @@ -598,13 +598,13 @@ mod rw_bytes {
}
}

impl<'a> Serialize for &VLByteSlice<'a> {
impl Serialize for &VLByteSlice<'_> {
fn tls_serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<usize, Error> {
tls_serialize_bytes(writer, self.0)
}
}

impl<'a> Serialize for VLByteSlice<'a> {
impl Serialize for VLByteSlice<'_> {
fn tls_serialize<W: std::io::Write>(&self, writer: &mut W) -> Result<usize, Error> {
tls_serialize_bytes(writer, self.0)
}
Expand Down

0 comments on commit e4f3875

Please sign in to comment.