[fix] prime sieve was missing the number 2

This commit is contained in:
ddidderr 2023-12-07 18:37:42 +01:00
parent 4c56ab2779
commit 2f6449a25a
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14

View File

@ -7,6 +7,7 @@ pub fn get_primes(max_nr: usize) -> Vec<u64> {
sieve[1] = false; sieve[1] = false;
let mut nr = 2; let mut nr = 2;
primes.push(2);
loop { loop {
check_off_multiples_of_nr(nr, &mut sieve); check_off_multiples_of_nr(nr, &mut sieve);