Skip to content

Commit

Permalink
Move counting of 2 outside else block
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Oct 22, 2023
1 parent 3c38bba commit 57af72a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,7 @@ pub const fn prime_counts<const N: usize>() -> [usize; N] {
if N <= 2 {
return counts;
}
if N > 2 {
counts[2] = 1;
}

counts[2] = 1;
let prime_status: [bool; N] = are_prime();
let mut count = 1;
let mut i = 3;
Expand Down

0 comments on commit 57af72a

Please sign in to comment.