Skip to content

Commit

Permalink
run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Nov 2, 2024
1 parent fb2e4b7 commit f7b42f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "byte-unit"
version = "5.1.4"
version = "5.1.5"
authors = ["Magic Len <[email protected]>"]
edition = "2021"
rust-version = "1.69"
Expand Down
3 changes: 3 additions & 0 deletions src/bit/built_in_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl From<u8> for Bit {
}

impl From<usize> for Bit {
#[allow(unexpected_cfgs)]
#[inline]
fn from(value: usize) -> Self {
#[cfg(target_pointer_width = "128")]
Expand Down Expand Up @@ -103,6 +104,7 @@ impl TryFrom<i8> for Bit {
impl TryFrom<isize> for Bit {
type Error = ExceededBoundsError;

#[allow(unexpected_cfgs)]
#[inline]
fn try_from(value: isize) -> Result<Self, Self::Error> {
#[cfg(target_pointer_width = "128")]
Expand Down Expand Up @@ -179,6 +181,7 @@ impl TryFrom<Bit> for u8 {
impl TryFrom<Bit> for usize {
type Error = TryFromIntError;

#[allow(unexpected_cfgs)]
#[inline]
fn try_from(bit: Bit) -> Result<Self, Self::Error> {
#[cfg(target_pointer_width = "128")]
Expand Down
3 changes: 3 additions & 0 deletions src/byte/built_in_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl From<u8> for Byte {
}

impl From<usize> for Byte {
#[allow(unexpected_cfgs)]
#[inline]
fn from(value: usize) -> Self {
#[cfg(target_pointer_width = "128")]
Expand Down Expand Up @@ -103,6 +104,7 @@ impl TryFrom<i8> for Byte {
impl TryFrom<isize> for Byte {
type Error = ExceededBoundsError;

#[allow(unexpected_cfgs)]
#[inline]
fn try_from(value: isize) -> Result<Self, Self::Error> {
#[cfg(target_pointer_width = "128")]
Expand Down Expand Up @@ -179,6 +181,7 @@ impl TryFrom<Byte> for u8 {
impl TryFrom<Byte> for usize {
type Error = TryFromIntError;

#[allow(unexpected_cfgs)]
#[inline]
fn try_from(byte: Byte) -> Result<Self, Self::Error> {
#[cfg(target_pointer_width = "128")]
Expand Down

0 comments on commit f7b42f0

Please sign in to comment.