Skip to content

Commit 3a5a229

Browse files
committed
fix clippy
1 parent fceed92 commit 3a5a229

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gix-utils/src/btoi.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ macro_rules! min_num_traits {
6060
($t : ty, from_u32 => $from_u32 : expr) => {
6161
impl MinNumTraits for $t {
6262
fn from_u32(n: u32) -> Option<$t> {
63+
#[allow(clippy::redundant_closure_call)]
6364
$from_u32(n)
6465
}
6566

@@ -153,8 +154,7 @@ fn btou_assert() {
153154
pub fn btou_radix<I: MinNumTraits>(bytes: &[u8], radix: u32) -> Result<I, ParseIntegerError> {
154155
assert!(
155156
(2..=36).contains(&radix),
156-
"radix must lie in the range 2..=36, found {}",
157-
radix
157+
"radix must lie in the range 2..=36, found {radix}"
158158
);
159159

160160
let base = I::from_u32(radix).expect("radix can be represented as integer");
@@ -286,8 +286,7 @@ fn btoi_assert() {
286286
fn btoi_radix<I: MinNumTraits>(bytes: &[u8], radix: u32) -> Result<I, ParseIntegerError> {
287287
assert!(
288288
(2..=36).contains(&radix),
289-
"radix must lie in the range 2..=36, found {}",
290-
radix
289+
"radix must lie in the range 2..=36, found {radix}"
291290
);
292291

293292
let base = I::from_u32(radix).expect("radix can be represented as integer");

0 commit comments

Comments
 (0)