File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -589,9 +589,7 @@ where
589589 // Euler criterion: if `Q^((n+1)/2) != Q * (Q/n) mod n`, report `n` as composite.
590590 let q_jacobi = jacobi_symbol_vartime ( abs_q, q_is_negative, & candidate) ;
591591 let t = match q_jacobi {
592- JacobiSymbol :: Zero => {
593- unreachable ! ( "we previously checked that either `Q = 1` or `gcd(Q, n) != 1" )
594- }
592+ JacobiSymbol :: Zero => unreachable ! ( "we previously checked that either `Q = 1` or `gcd(Q, n) != 1" ) ,
595593 JacobiSymbol :: One => q,
596594 JacobiSymbol :: MinusOne => -q,
597595 } ;
@@ -722,9 +720,7 @@ mod tests {
722720 ( BaseType :: BruteForce , LucasCheck :: ExtraStrong ) => pseudoprimes:: EXTRA_STRONG_LUCAS ,
723721 ( BaseType :: AStar , LucasCheck :: LucasV ) => pseudoprimes:: LUCAS_V ,
724722 ( BaseType :: AStar , LucasCheck :: Bpsw21 ) => & [ ] ,
725- _ => {
726- panic ! ( "We do not have pseudoprimes listed for this combination of base and check" )
727- }
723+ _ => panic ! ( "We do not have pseudoprimes listed for this combination of base and check" ) ,
728724 } ;
729725
730726 pseudoprimes. contains ( & num)
Original file line number Diff line number Diff line change 4141 let bit_length = bit_length. get ( ) ;
4242
4343 let mut random = T :: try_random_bits ( rng, bit_length) . map_err ( |err| match err {
44- RandomBitsError :: RandCore ( _) => {
45- unreachable ! ( "`rng` impls `CryptoRng` and therefore is infallible" )
46- }
44+ RandomBitsError :: RandCore ( _) => unreachable ! ( "`rng` impls `CryptoRng` and therefore is infallible" ) ,
4745 RandomBitsError :: BitsPrecisionMismatch { .. } => {
4846 unreachable ! ( "we are not requesting a specific `bits_precision`" )
4947 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use rayon::iter::{ParallelBridge, ParallelIterator};
77use crate :: {
88 error:: Error ,
99 hazmat:: { SetBits , SieveFactory , SmallFactorsSieveFactory } ,
10- presets:: { is_prime , Flavor } ,
10+ presets:: { Flavor , is_prime } ,
1111} ;
1212
1313/// Sieves through the results of `sieve_factory` using a thread pool with `threadcount` threads,
@@ -117,7 +117,7 @@ where
117117
118118#[ cfg( test) ]
119119mod tests {
120- use crypto_bigint:: { nlimbs , BoxedUint , U128 } ;
120+ use crypto_bigint:: { BoxedUint , U128 , nlimbs } ;
121121 use rand:: rngs:: ChaCha12Rng ;
122122 use rand_core:: SeedableRng ;
123123
You can’t perform that action at this time.
0 commit comments