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 bb0c932 commit 35b7187Copy full SHA for 35b7187
bigint/src/tests/biguint.rs
@@ -1092,10 +1092,10 @@ fn test_is_even() {
1092
#[test]
1093
fn test_modpow() {
1094
fn check(b: usize, e: usize, m: usize, r: usize) {
1095
- let big_b: BigUint = FromPrimitive::from_usize(b).unwrap();
1096
- let big_e: BigUint = FromPrimitive::from_usize(e).unwrap();
1097
- let big_m: BigUint = FromPrimitive::from_usize(m).unwrap();
1098
- let big_r: BigUint = FromPrimitive::from_usize(r).unwrap();
+ let big_b = BigUint::from(b);
+ let big_e = BigUint::from(e);
+ let big_m = BigUint::from(m);
+ let big_r = BigUint::from(r);
1099
1100
assert_eq!(big_b.modpow(&big_e, &big_m), big_r);
1101
}
0 commit comments