Skip to content

Commit

Permalink
clippy was wrong/insufficiently detailed
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 12, 2024
1 parent 822791a commit 5c4161e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/primes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Iterator for Eratosthenes {
fn next_prime(sieve: &mut HashMap<u64, Vec<u64>>, candidate: u64) -> u64 {
match sieve.get(&candidate) {
Some(numbers) => {
for num in numbers {
for num in numbers.to_owned() {
sieve
.entry(candidate + num)
.and_modify(|v| v.push(num))
Expand Down

0 comments on commit 5c4161e

Please sign in to comment.