mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 04:07:23 +00:00
devices: tsc: use slice where a Vec is not needed
Fixes a Rust 1.60 clippy lint: error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do BUG=b:239075544 TEST=tools/clippy # with rust-toolchain = 1.60.0 Change-Id: Ib1a8e30bc70a7c7036c038f364ec1067169a0698 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764423 Reviewed-by: Noah Gold <nkgold@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
c8506b8abb
commit
57d3db037f
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ pub fn standard_deviation<T: num_traits::ToPrimitive + num_traits::Num + Copy>(i
|
|||
(variance / count as f64).sqrt()
|
||||
}
|
||||
|
||||
fn sort_and_get_bounds(items: &mut Vec<i128>, stdev_limit: f64) -> (f64, f64) {
|
||||
fn sort_and_get_bounds(items: &mut [i128], stdev_limit: f64) -> (f64, f64) {
|
||||
items.sort_unstable();
|
||||
let median = items[items.len() / 2];
|
||||
|
||||
|
|
Loading…
Reference in a new issue