From 634d08a4e6e02273e2b86b380183ffb35ed78ccd Mon Sep 17 00:00:00 2001 From: Mimoja Date: Mon, 24 Jun 2024 19:14:44 +0200 Subject: [PATCH] clippy,nits: remove needless borrow The borrow will be immediately dereferenced by the compiler and is therefore unnecessary. Signed-off-by: Mimoja --- src/add_functions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add_functions.rs b/src/add_functions.rs index e91da1c..67332d0 100644 --- a/src/add_functions.rs +++ b/src/add_functions.rs @@ -148,7 +148,7 @@ pub mod tests { ]; let mut rng = rand::rngs::StdRng::seed_from_u64(seed); - let event_type_dist = WeightedIndex::new(&[10, 10, 1])?; + let event_type_dist = WeightedIndex::new([10, 10, 1])?; let window_properties_dist = WeightedIndex::new(window_properties.iter().map(|e| e.0))?; let app_id_dist = rand::distributions::Uniform::from(0..100); let data = (0..eles).map(|_| match event_type_dist.sample(&mut rng) {