Skip to content

Commit

Permalink
fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Nov 25, 2023
1 parent 59fd9cd commit 895d5fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ impl Unit {
self.as_bits_u128() as u64
}

#[cfg(any(feature = "byte", feature = "bit"))]
#[cfg(feature = "byte")]
#[inline]
pub(crate) const fn as_bytes_u128(self) -> u128 {
debug_assert!(!matches!(self, Unit::Bit));

self.as_bits_u128() >> 3
}

#[cfg(any(feature = "byte", feature = "bit"))]
#[cfg(feature = "byte")]
#[cfg(not(feature = "u128"))]
#[inline]
pub(crate) const fn as_bytes_u64(self) -> u64 {
Expand Down

0 comments on commit 895d5fd

Please sign in to comment.