From 67398e38ce7eeb4570ba9427f9c2a67fbb30fa58 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 7 May 2024 16:14:51 -0700 Subject: [PATCH] Fix `clippy::needless_borrows_for_generic_args` --- src/crand.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crand.rs b/src/crand.rs index 44ef441..12d55e0 100644 --- a/src/crand.rs +++ b/src/crand.rs @@ -95,7 +95,7 @@ fn generic_standard_f64() { let mut rng = test_rng(); let dist = ComplexDistribution::new(Standard, Standard); for _ in 0..100 { - let c: Complex = rng.sample(&dist); + let c: Complex = rng.sample(dist); assert!(c.re >= 0.0 && c.re < 1.0); assert!(c.im >= 0.0 && c.im < 1.0); } @@ -111,7 +111,7 @@ fn generic_uniform_f64() { let dist = ComplexDistribution::new(re, im); for _ in 0..100 { // no type annotation required, since `Uniform` only produces one type. - let c = rng.sample(&dist); + let c = rng.sample(dist); assert!(c.re >= -100.0 && c.re < 0.0); assert!(c.im >= 0.0 && c.im < 100.0); } @@ -126,7 +126,7 @@ fn generic_mixed_f64() { let dist = ComplexDistribution::new(re, Standard); for _ in 0..100 { // no type annotation required, since `Uniform` only produces one type. - let c = rng.sample(&dist); + let c = rng.sample(dist); assert!(c.re >= -100.0 && c.re < 0.0); assert!(c.im >= 0.0 && c.im < 1.0); } @@ -142,7 +142,7 @@ fn generic_uniform_i32() { let dist = ComplexDistribution::new(re, im); for _ in 0..100 { // no type annotation required, since `Uniform` only produces one type. - let c = rng.sample(&dist); + let c = rng.sample(dist); assert!(c.re >= -100 && c.re < 0); assert!(c.im >= 0 && c.im < 100); }