From feeb0fd1543e594a92fa7ea55f559d7ea59ea2c4 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sun, 21 Apr 2024 23:05:16 +0200 Subject: [PATCH] Rewrite some `*=` for clarity clippy complained about this and thought it was unintended --- src/distribution/gamma.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/distribution/gamma.rs b/src/distribution/gamma.rs index 02b55190..b8e7df44 100644 --- a/src/distribution/gamma.rs +++ b/src/distribution/gamma.rs @@ -341,8 +341,8 @@ pub fn sample_unchecked(rng: &mut R, shape: f64, rate: f64) -> }; } - v *= v * v; - x *= x; + v = v * v * v; + x = x * x; let u: f64 = rng.gen(); if u < 1.0 - 0.0331 * x * x || u.ln() < 0.5 * x + d * (1.0 - v + v.ln()) { return afix * d * v / rate;