Skip to content

Commit 38ee563

Browse files
committed
rand_distr: Remove unused fields
This breaks serialization compatibility with older versions.
1 parent 3c8f92b commit 38ee563

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

rand_distr/src/gamma.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ struct BB<N> {
544544
struct BC<N> {
545545
alpha: N,
546546
beta: N,
547-
delta: N,
548547
kappa1: N,
549548
kappa2: N,
550549
}
@@ -646,7 +645,7 @@ where
646645
Ok(Beta {
647646
a, b, switched_params,
648647
algorithm: BetaAlgorithm::BC(BC {
649-
alpha, beta, delta, kappa1, kappa2,
648+
alpha, beta, kappa1, kappa2,
650649
})
651650
})
652651
}

rand_distr/src/normal_inverse_gaussian.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ where
3434
StandardNormal: Distribution<F>,
3535
Standard: Distribution<F>,
3636
{
37-
alpha: F,
3837
beta: F,
3938
inverse_gaussian: InverseGaussian<F>,
4039
}
@@ -63,7 +62,6 @@ where
6362
let inverse_gaussian = InverseGaussian::new(mu, F::one()).unwrap();
6463

6564
Ok(Self {
66-
alpha,
6765
beta,
6866
inverse_gaussian,
6967
})

rand_distr/src/zipf.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ where F: Float, Standard: Distribution<F>, OpenClosed01: Distribution<F>
145145
#[derive(Clone, Copy, Debug)]
146146
pub struct Zipf<F>
147147
where F: Float, Standard: Distribution<F> {
148-
n: F,
149148
s: F,
150149
t: F,
151150
q: F,
@@ -202,7 +201,7 @@ where F: Float, Standard: Distribution<F> {
202201
};
203202
debug_assert!(t > F::zero());
204203
Ok(Zipf {
205-
n, s, t, q
204+
s, t, q
206205
})
207206
}
208207

0 commit comments

Comments
 (0)