Skip to content

Commit

Permalink
Merge pull request #1184 from vks/remove-unused-fields
Browse files Browse the repository at this point in the history
Remove unused fields
  • Loading branch information
vks authored Apr 21, 2022
2 parents 367cf50 + 5f0d3a1 commit f0f15b5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions rand_distr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - unreleased
- Remove unused fields from `Gamma`, `NormalInverseGaussian` and `Zipf` distributions (#1184)
This breaks serialization compatibility with older versions.

## [0.4.3] - 2021-12-30
- Fix `no_std` build (#1208)

Expand Down
3 changes: 1 addition & 2 deletions rand_distr/src/gamma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ struct BB<N> {
struct BC<N> {
alpha: N,
beta: N,
delta: N,
kappa1: N,
kappa2: N,
}
Expand Down Expand Up @@ -646,7 +645,7 @@ where
Ok(Beta {
a, b, switched_params,
algorithm: BetaAlgorithm::BC(BC {
alpha, beta, delta, kappa1, kappa2,
alpha, beta, kappa1, kappa2,
})
})
}
Expand Down
2 changes: 0 additions & 2 deletions rand_distr/src/normal_inverse_gaussian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ where
StandardNormal: Distribution<F>,
Standard: Distribution<F>,
{
alpha: F,
beta: F,
inverse_gaussian: InverseGaussian<F>,
}
Expand Down Expand Up @@ -63,7 +62,6 @@ where
let inverse_gaussian = InverseGaussian::new(mu, F::one()).unwrap();

Ok(Self {
alpha,
beta,
inverse_gaussian,
})
Expand Down
3 changes: 1 addition & 2 deletions rand_distr/src/zipf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ where F: Float, Standard: Distribution<F>, OpenClosed01: Distribution<F>
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Zipf<F>
where F: Float, Standard: Distribution<F> {
n: F,
s: F,
t: F,
q: F,
Expand Down Expand Up @@ -202,7 +201,7 @@ where F: Float, Standard: Distribution<F> {
};
debug_assert!(t > F::zero());
Ok(Zipf {
n, s, t, q
s, t, q
})
}

Expand Down

0 comments on commit f0f15b5

Please sign in to comment.