cargo clippy

This commit is contained in:
lluni 2023-02-01 16:10:56 +01:00
parent 2f3745a31c
commit a8270914e0
Signed by: lluni
GPG key ID: ACEEB468BC325D35
5 changed files with 15 additions and 15 deletions

View file

@ -96,7 +96,7 @@ fn main() -> Result<(), Box<dyn Error>> {
.draw_series(LineSeries::new(data1, &RED))
.unwrap()
.label("true values")
.legend(|(x, y)| PathElement::new(vec![(x, y), (x + 1, y)], &RED));
.legend(|(x, y)| PathElement::new(vec![(x, y), (x + 1, y)], RED));
// add the second plot
let data2: Vec<(f64, f64)> = x_test
@ -108,7 +108,7 @@ fn main() -> Result<(), Box<dyn Error>> {
.draw_series(LineSeries::new(data2, &BLUE))
.unwrap()
.label("predicted values")
.legend(|(x, y)| PathElement::new(vec![(x, y), (x + 1, y)], &BLUE));
.legend(|(x, y)| PathElement::new(vec![(x, y), (x + 1, y)], BLUE));
Ok(())
}

View file

@ -55,6 +55,6 @@ fn main() {
let mut prediction = y_test.get(i).unwrap().to_owned();
// comment the following line to see the exact predictions
prediction.map_mut(|x| *x = x.round());
print!("prediction: {}\n", prediction);
println!("prediction: {prediction}");
}
}