Skip to content

Commit f7b42f0

Browse files
committed
run clippy
1 parent fb2e4b7 commit f7b42f0

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "byte-unit"
3-
version = "5.1.4"
3+
version = "5.1.5"
44
authors = ["Magic Len <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.69"

src/bit/built_in_traits.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl From<u8> for Bit {
4141
}
4242

4343
impl From<usize> for Bit {
44+
#[allow(unexpected_cfgs)]
4445
#[inline]
4546
fn from(value: usize) -> Self {
4647
#[cfg(target_pointer_width = "128")]
@@ -103,6 +104,7 @@ impl TryFrom<i8> for Bit {
103104
impl TryFrom<isize> for Bit {
104105
type Error = ExceededBoundsError;
105106

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

184+
#[allow(unexpected_cfgs)]
182185
#[inline]
183186
fn try_from(bit: Bit) -> Result<Self, Self::Error> {
184187
#[cfg(target_pointer_width = "128")]

src/byte/built_in_traits.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl From<u8> for Byte {
4141
}
4242

4343
impl From<usize> for Byte {
44+
#[allow(unexpected_cfgs)]
4445
#[inline]
4546
fn from(value: usize) -> Self {
4647
#[cfg(target_pointer_width = "128")]
@@ -103,6 +104,7 @@ impl TryFrom<i8> for Byte {
103104
impl TryFrom<isize> for Byte {
104105
type Error = ExceededBoundsError;
105106

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

184+
#[allow(unexpected_cfgs)]
182185
#[inline]
183186
fn try_from(byte: Byte) -> Result<Self, Self::Error> {
184187
#[cfg(target_pointer_width = "128")]

0 commit comments

Comments
 (0)