File tree 6 files changed +17783
-3199
lines changed
6 files changed +17783
-3199
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,8 @@ impl Default for NaiveBuffer {
265
265
266
266
impl NaiveBuffer {
267
267
#[ inline]
268
- #[ must_use] pub fn new ( ) -> Self {
268
+ #[ must_use]
269
+ pub fn new ( ) -> Self {
269
270
let list = SMALL_PRIMES . iter ( ) . map ( |& p| u64:: from ( p) ) . collect ( ) ;
270
271
NaiveBuffer {
271
272
list,
@@ -359,7 +360,8 @@ impl NaiveBuffer {
359
360
}
360
361
361
362
/// Returns all primes ≤ `limit` and takes ownership. The primes are sorted.
362
- #[ must_use] pub fn into_primes ( mut self , limit : u64 ) -> std:: vec:: IntoIter < u64 > {
363
+ #[ must_use]
364
+ pub fn into_primes ( mut self , limit : u64 ) -> std:: vec:: IntoIter < u64 > {
363
365
self . reserve ( limit) ;
364
366
let position = match self . list . binary_search ( & limit) {
365
367
Ok ( p) => p + 1 ,
@@ -379,7 +381,8 @@ impl NaiveBuffer {
379
381
}
380
382
381
383
/// Returns primes of certain amount counting from 2 and takes ownership. The primes are sorted.
382
- #[ must_use] pub fn into_nprimes ( mut self , count : usize ) -> std:: vec:: IntoIter < u64 > {
384
+ #[ must_use]
385
+ pub fn into_nprimes ( mut self , count : usize ) -> std:: vec:: IntoIter < u64 > {
383
386
let ( _, bound) = nth_prime_bounds ( & ( count as u64 ) )
384
387
. expect ( "Estimated size of the largest prime will be larger than u64 limit" ) ;
385
388
self . reserve ( bound) ;
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ impl ExactRoots for BigInt {
157
157
#[ cfg( test) ]
158
158
mod tests {
159
159
use super :: * ;
160
-
161
160
162
161
#[ test]
163
162
fn exact_root_test ( ) {
You can’t perform that action at this time.
0 commit comments