We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b3734ba + 452ab26 commit 1237aa5Copy full SHA for 1237aa5
exercises/conversions/using_as.rs
@@ -8,7 +8,7 @@
8
// I AM NOT DONE
9
10
fn average(values: &[f64]) -> f64 {
11
- let total = values.iter().fold(0.0, |a, b| a + b);
+ let total = values.iter().sum::<f64>();
12
total / values.len()
13
}
14
0 commit comments