chore: Run rustfmt on exercises

This commit is contained in:
Étienne Barrié
2020-08-10 10:24:21 -04:00
parent c4853ee6bb
commit 3144d3ae63
12 changed files with 30 additions and 25 deletions

View File

@@ -82,5 +82,4 @@ mod tests {
fn missing_name_and_invalid_age() {
",one".parse::<Person>().unwrap();
}
}

View File

@@ -2,7 +2,7 @@
// Basically, this is the same as From. The main difference is that this should return a Result type
// instead of the target type itself.
// You can read more about it at https://doc.rust-lang.org/std/convert/trait.TryFrom.html
use std::convert::{TryInto, TryFrom};
use std::convert::{TryFrom, TryInto};
#[derive(Debug)]
struct Color {

View File

@@ -7,9 +7,7 @@
// I AM NOT DONE
fn average(values: &[f64]) -> f64 {
let total = values
.iter()
.fold(0.0, |a, b| a + b);
let total = values.iter().fold(0.0, |a, b| a + b);
total / values.len()
}