Skip to content

Commit

Permalink
Fix clippy::needless_borrows_for_generic_args
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed May 7, 2024
1 parent e997032 commit 67398e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/crand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<f64> = rng.sample(&dist);
let c: Complex<f64> = rng.sample(dist);
assert!(c.re >= 0.0 && c.re < 1.0);
assert!(c.im >= 0.0 && c.im < 1.0);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 67398e3

Please sign in to comment.