Skip to content

Commit

Permalink
Merge pull request #54 from nickbabcock/mut
Browse files Browse the repository at this point in the history
Remove unnecessary mut refs
  • Loading branch information
nickbabcock authored Sep 11, 2024
2 parents a30dd9c + edffc73 commit 6ee5ecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,15 @@ impl<'a, const LE: bool> BitterState<'a, LE> {
}

#[inline]
fn read(&mut self) -> u64 {
fn read(&self) -> u64 {
debug_assert!(self.unbuffered_bytes() >= 8);
let mut result = [0u8; 8];
result.copy_from_slice(&self.data[..8]);
Self::which(u64::from_ne_bytes(result))
}

#[inline]
fn read_eof(&mut self) -> u64 {
fn read_eof(&self) -> u64 {
debug_assert!(self.unbuffered_bytes() < 8);
let mut result = [0u8; 8];
let len = self.unbuffered_bytes();
Expand Down

0 comments on commit 6ee5ecb

Please sign in to comment.