Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Dec 31, 2019
1 parent 59df78f commit 413fc4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rand_distr/src/pert.rs
Expand Up @@ -51,8 +51,8 @@ pub enum PertError {
impl fmt::Display for PertError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {
PertError::RangeTooSmall => "min..=max is not proper range in PERT distribution",
PertError::ModeRange => "mode is outside min..=max in PERT distribution",
PertError::RangeTooSmall => "requirement min < max is not met in PERT distribution",
PertError::ModeRange => "mode is outside [min, max] in PERT distribution",
PertError::ShapeTooSmall => "shape < 0 or is NaN in PERT distribution",
})
}
Expand Down
4 changes: 2 additions & 2 deletions rand_distr/src/triangular.rs
Expand Up @@ -51,9 +51,9 @@ impl fmt::Display for TriangularError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {
TriangularError::RangeTooSmall => {
"min..=max is not proper range in triangular distribution"
"requirement min <= max is not met in triangular distribution"
}
TriangularError::ModeRange => "mode is outside min..=max in triangular distribution",
TriangularError::ModeRange => "mode is outside [min, max] in triangular distribution",
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/distributions/bernoulli.rs
Expand Up @@ -72,7 +72,7 @@ pub enum BernoulliError {
impl fmt::Display for BernoulliError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {
BernoulliError::InvalidProbability => "p is outside 0..=1 in Bernoulli distribution",
BernoulliError::InvalidProbability => "p is outside [0, 1] in Bernoulli distribution",
})
}
}
Expand Down

0 comments on commit 413fc4b

Please sign in to comment.