Skip to content

Commit 286cfae

Browse files
committed
update
1 parent 8b7244a commit 286cfae

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/base_convert.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {
127127

128128
let mut tail = digits.into_iter();
129129
match tail.next() {
130-
Some(digit) => Self::from_base_le_recurse::<I>(digit, base, tail),
130+
Some(digit) => Self::from_base_le_recurse(digit, base, &mut tail),
131131
None => Ok(Self::ZERO),
132132
}
133133
}
@@ -138,10 +138,10 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {
138138
/// same construction loop as [`Uint::from_base_be`] while exiting the
139139
/// recursive callstack.
140140
#[inline]
141-
fn from_base_le_recurse<I: IntoIterator<Item = u64>>(
141+
fn from_base_le_recurse<I: Iterator<Item = u64>>(
142142
digit: u64,
143143
base: u64,
144-
mut tail: I::IntoIter,
144+
tail: &mut I,
145145
) -> Result<Self, BaseConvertError> {
146146
if digit > base {
147147
return Err(BaseConvertError::InvalidDigit(digit, base));
@@ -184,6 +184,7 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {
184184
Ok(result)
185185
}
186186
}
187+
187188
struct SpigotLittle<const LIMBS: usize> {
188189
base: u64,
189190
limbs: [u64; LIMBS],

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
clippy::redundant_pub_crate,
99
clippy::unreadable_literal,
1010
clippy::let_unit_value,
11+
clippy::option_if_let_else,
1112
)]
1213
#![cfg_attr(
1314
any(test, feature = "bench"),

0 commit comments

Comments
 (0)