Skip to content

Commit 927bfc5

Browse files
committed
Removed step_by temporarily
1 parent 9388761 commit 927bfc5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ This also provides a few functions unconnected to `PrimeSet`, which will be fast
6060
case, but slower in the long term as they do not use any caching of primes.
6161
6262
*/
63-
#![feature(step_by)]
6463
#![doc(html_root_url = "https://wackywendell.github.io/primes/")]
6564

6665
#[warn(non_camel_case_types)]
@@ -253,7 +252,9 @@ impl<'a> Iterator for PrimeSetIter<'a> {
253252
/// Find the first factor (other than 1) of a number
254253
fn firstfac(x: u64) -> u64 {
255254
if x % 2 == 0 { return 2; };
256-
for n in (3..).step_by(2).take_while(|m| m*m <= x) {
255+
// TODO: return to step_by
256+
// for n in (3..).step_by(2).take_while(|m| m*m <= x) {
257+
for n in (1..).map(|m| 2*m+1).take_while(|m| m*m <= x) {
257258
if x % n == 0 { return n; };
258259
}
259260
return x;

0 commit comments

Comments
 (0)