Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jul 29, 2023
1 parent ae968f5 commit 4255197
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/base_convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {

let mut tail = digits.into_iter();
match tail.next() {
Some(digit) => Self::from_base_le_recurse::<I>(digit, base, tail),
Some(digit) => Self::from_base_le_recurse(digit, base, &mut tail),
None => Ok(Self::ZERO),

Check warning on line 131 in src/base_convert.rs

View check run for this annotation

Codecov / codecov/patch

src/base_convert.rs#L131

Added line #L131 was not covered by tests
}
}
Expand All @@ -138,10 +138,10 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {
/// same construction loop as [`Uint::from_base_be`] while exiting the
/// recursive callstack.
#[inline]
fn from_base_le_recurse<I: IntoIterator<Item = u64>>(
fn from_base_le_recurse<I: Iterator<Item = u64>>(
digit: u64,
base: u64,
mut tail: I::IntoIter,
tail: &mut I,
) -> Result<Self, BaseConvertError> {
if digit > base {
return Err(BaseConvertError::InvalidDigit(digit, base));

Check warning on line 147 in src/base_convert.rs

View check run for this annotation

Codecov / codecov/patch

src/base_convert.rs#L147

Added line #L147 was not covered by tests
Expand Down Expand Up @@ -184,6 +184,7 @@ impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS> {
Ok(result)
}
}

struct SpigotLittle<const LIMBS: usize> {
base: u64,
limbs: [u64; LIMBS],
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
clippy::redundant_pub_crate,
clippy::unreadable_literal,
clippy::let_unit_value,
clippy::option_if_let_else,
)]
#![cfg_attr(
any(test, feature = "bench"),
Expand Down

0 comments on commit 4255197

Please sign in to comment.