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:
Daniel Verkamp 2022-07-14 13:06:03 -07:00 committed by crosvm LUCI
parent c8506b8abb
commit 57d3db037f

View file

@ -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];