Skip to content

Commit f0f15b5

Browse files
authored
Merge pull request #1184 from vks/remove-unused-fields
Remove unused fields
2 parents 367cf50 + 5f0d3a1 commit f0f15b5

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

rand_distr/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.5.0] - unreleased
8+
- Remove unused fields from `Gamma`, `NormalInverseGaussian` and `Zipf` distributions (#1184)
9+
This breaks serialization compatibility with older versions.
10+
711
## [0.4.3] - 2021-12-30
812
- Fix `no_std` build (#1208)
913

rand_distr/src/gamma.rs

+1-2
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

-2
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

+1-2
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, PartialEq)]
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)