chore: rustfmt

This commit is contained in:
Muhammad Nauman Raza 2024-11-20 20:44:03 +00:00
parent add6f2403c
commit b7c61ccef8
Signed by: devraza
GPG key ID: 91EAD6081011574B
7 changed files with 27 additions and 22 deletions

View file

@ -8,7 +8,12 @@ fn main() {
} }
for i in sequence.clone() { for i in sequence.clone() {
if i % 2 != 0 || i > 4000000 { if i % 2 != 0 || i > 4000000 {
sequence.remove(sequence.iter().position(|x| *x == i).expect("Item not found")); sequence.remove(
sequence
.iter()
.position(|x| *x == i)
.expect("Item not found"),
);
} }
} }
let sum: i32 = sequence.iter().sum(); let sum: i32 = sequence.iter().sum();