Skip to content

Commit 9030605

Browse files
committed
adjust fmt
1 parent 838d9c5 commit 9030605

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/hazmat/lucas.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

src/hazmat/sieve.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ where
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
}

src/multicore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rayon::iter::{ParallelBridge, ParallelIterator};
77
use 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)]
119119
mod 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

0 commit comments

Comments
 (0)