Skip to content

Commit

Permalink
fuzz: expose reader functions for fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarMorrigan committed Nov 27, 2024
1 parent 53881bf commit 78def56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mqrstt/src/packets/primitive/fixed_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub(crate) struct FixedHeader {
}

impl FixedHeader {
pub fn read_fixed_header(mut header: Iter<u8>) -> Result<(Self, usize), ReadBytes<DeserializeError>> {
pub(crate) fn read_fixed_header(mut header: Iter<u8>) -> Result<(Self, usize), ReadBytes<DeserializeError>> {
if header.len() < 2 {
return Err(ReadBytes::InsufficientBytes(2 - header.len()));
}
Expand All @@ -46,7 +46,7 @@ impl FixedHeader {
Ok((Self { packet_type, flags, remaining_length }, header_length))
}

pub async fn async_read<S>(stream: &mut S) -> Result<(Self, usize), crate::packets::error::ReadError>
pub(crate) async fn async_read<S>(stream: &mut S) -> Result<(Self, usize), crate::packets::error::ReadError>
where
S: tokio::io::AsyncRead + Unpin,
{
Expand Down

0 comments on commit 78def56

Please sign in to comment.