Skip to content

Commit

Permalink
Supress clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
recmo committed Oct 14, 2024
1 parent 04b2dfb commit bac98dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/support/der.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ impl<const BITS: usize, const LIMBS: usize> TryFrom<&DerUint> for Uint<BITS, LIM
}
}

// `Any::new()` only retutns error when length > u32:MAX, which is out of scope
// for Uint.
#[allow(clippy::fallible_impl_from)]
impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for Any {
fn from(uint: &Uint<BITS, LIMBS>) -> Self {
if uint.is_zero() {
Expand All @@ -109,6 +112,9 @@ impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for Any {
}
}

// `Int::new()` only retutns error when length > u32:MAX, which is out of scope
// for Uint.
#[allow(clippy::fallible_impl_from)]
impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for Int {
fn from(uint: &Uint<BITS, LIMBS>) -> Self {
if uint.is_zero() {
Expand All @@ -123,6 +129,9 @@ impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for Int {
}
}

// `DerUint::new()` only retutns error when length > u32:MAX, which is out of
// scope for Uint.
#[allow(clippy::fallible_impl_from)]
impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for DerUint {
fn from(uint: &Uint<BITS, LIMBS>) -> Self {
if uint.is_zero() {
Expand Down

0 comments on commit bac98dd

Please sign in to comment.