mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
use pointer args
This commit is contained in:
parent
ed128872eb
commit
7530d76f00
3 changed files with 3 additions and 3 deletions
|
@ -100,7 +100,7 @@ impl Round {
|
|||
|
||||
self.linear = rmse < 0.05 && max_error < 0.1 && a > -0.1;
|
||||
|
||||
fn normalize(xs: &mut Vec<f64>) {
|
||||
fn normalize(xs: &mut [f64]) {
|
||||
let max = xs.iter().copied().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap();
|
||||
xs.iter_mut().for_each(|it| *it /= max);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue