diff --git a/src/sieve.rs b/src/sieve.rs index d625d3a..42038bc 100644 --- a/src/sieve.rs +++ b/src/sieve.rs @@ -7,6 +7,7 @@ pub fn get_primes(max_nr: usize) -> Vec { sieve[1] = false; let mut nr = 2; + primes.push(2); loop { check_off_multiples_of_nr(nr, &mut sieve);