Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Fix bad trait signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Veritius committed Aug 2, 2024
1 parent 6270e16 commit 5b8e03c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions extras/src/numbers/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ mod octs {
type Error = T::Error;

#[inline]
fn encode(&self, dst: &mut impl octs::Write) -> Result<(), octs::BufTooShortOr<Self::Error>> {
self.0.encode(dst)
fn encode(&self, mut dst: impl octs::Write) -> Result<(), octs::BufTooShortOr<Self::Error>> {
self.0.encode(&mut dst)
}
}

Expand All @@ -238,8 +238,8 @@ mod octs {
type Error = T::Error;

#[inline]
fn decode(src: &mut impl octs::Read) -> Result<Self, octs::BufTooShortOr<Self::Error>> {
T::decode(src).map(|v| Self(v))
fn decode(mut src: impl octs::Read) -> Result<Self, octs::BufTooShortOr<Self::Error>> {
T::decode(&mut src).map(|v| Self(v))
}
}
}
8 changes: 4 additions & 4 deletions extras/src/numbers/varint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ mod octs {
impl Encode for VarInt {
type Error = ();

fn encode(&self, dst: &mut impl octs::Write) -> Result<(), octs::BufTooShortOr<Self::Error>> {
self.write(dst).map_err(|_| octs::BufTooShortOr::TooShort)
fn encode(&self, mut dst: impl octs::Write) -> Result<(), octs::BufTooShortOr<Self::Error>> {
self.write(&mut dst).map_err(|_| octs::BufTooShortOr::TooShort)
}
}

Expand All @@ -247,8 +247,8 @@ mod octs {
impl Decode for VarInt {
type Error = ();

fn decode(src: &mut impl octs::Read) -> Result<Self, octs::BufTooShortOr<Self::Error>> {
VarInt::read(src).map_err(|_| octs::BufTooShortOr::TooShort)
fn decode(mut src: impl octs::Read) -> Result<Self, octs::BufTooShortOr<Self::Error>> {
VarInt::read(&mut src).map_err(|_| octs::BufTooShortOr::TooShort)
}
}
}

0 comments on commit 5b8e03c

Please sign in to comment.