Skip to content

Commit a35e159

Browse files
authored
Fix clippy::only-used-in-recursion (#1186)
* Fix `clippy::only-used-in-recursion` error: parameter is only used in recursion --> crates/env/src/types.rs:60:22 | 60 | fn from_le_bytes(bytes: Self::Bytes) -> Self { | ^^^^^ help: if this is intentional, prefix with an underscore: `_bytes` | = note: `-D clippy::only-used-in-recursion` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion * Make recursion explicit
1 parent dec3870 commit a35e159

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/env/src/types.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl FromLittleEndian for u8 {
5858

5959
#[inline]
6060
fn from_le_bytes(bytes: Self::Bytes) -> Self {
61-
Self::from_le_bytes(bytes)
61+
u8::from_le_bytes(bytes)
6262
}
6363
}
6464

@@ -67,7 +67,7 @@ impl FromLittleEndian for u16 {
6767

6868
#[inline]
6969
fn from_le_bytes(bytes: Self::Bytes) -> Self {
70-
Self::from_le_bytes(bytes)
70+
u16::from_le_bytes(bytes)
7171
}
7272
}
7373

@@ -76,7 +76,7 @@ impl FromLittleEndian for u32 {
7676

7777
#[inline]
7878
fn from_le_bytes(bytes: Self::Bytes) -> Self {
79-
Self::from_le_bytes(bytes)
79+
u32::from_le_bytes(bytes)
8080
}
8181
}
8282

@@ -85,7 +85,7 @@ impl FromLittleEndian for u64 {
8585

8686
#[inline]
8787
fn from_le_bytes(bytes: Self::Bytes) -> Self {
88-
Self::from_le_bytes(bytes)
88+
u64::from_le_bytes(bytes)
8989
}
9090
}
9191

@@ -94,7 +94,7 @@ impl FromLittleEndian for u128 {
9494

9595
#[inline]
9696
fn from_le_bytes(bytes: Self::Bytes) -> Self {
97-
Self::from_le_bytes(bytes)
97+
u128::from_le_bytes(bytes)
9898
}
9999
}
100100

0 commit comments

Comments
 (0)