cargo clippy
This commit is contained in:
parent
2f3745a31c
commit
a8270914e0
5 changed files with 15 additions and 15 deletions
|
@ -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(())
|
||||
}
|
||||
|
|
|
@ -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}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue