We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da7ae7 commit 029d04dCopy full SHA for 029d04d
src/bigint.rs
@@ -2715,9 +2715,7 @@ impl TryFrom<&BigInt> for BigUint {
2715
2716
#[inline]
2717
fn try_from(value: &BigInt) -> Result<BigUint, TryFromBigIntError<()>> {
2718
- value
2719
- .to_biguint()
2720
- .ok_or_else(|| TryFromBigIntError::new(()))
+ value.to_biguint().ok_or(TryFromBigIntError::new(()))
2721
}
2722
2723
@@ -2730,8 +2728,7 @@ impl TryFrom<BigInt> for BigUint {
2730
2728
if value.sign() == Sign::Minus {
2731
2729
Err(TryFromBigIntError::new(value))
2732
} else {
2733
- let (_, biguint) = value.into_parts();
2734
- Ok(biguint)
+ Ok(value.data)
2735
2736
2737
0 commit comments