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); }