Skip to content

Commit

Permalink
Fixed build on Rust 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk20 committed Jan 26, 2016
1 parent 367fd2f commit de6af81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/distributions/poisson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Poisson {
/// `lambda`. Panics if `lambda <= 0`.
pub fn new(lambda: f64) -> Poisson {
assert!(lambda > 0.0, "Poisson::new called with `lambda` <= 0");
Poisson {
Poisson {
lambda: lambda,
exp_lambda: (-lambda).exp(),
log_lambda: lambda.ln(),
Expand All @@ -64,7 +64,7 @@ impl IndependentSample<u64> for Poisson {
let mut result = 0;
let mut p = 1.0;
while p > self.exp_lambda {
p *= rng.gen();
p *= rng.gen::<f64>();
result += 1;
}
result - 1
Expand Down

0 comments on commit de6af81

Please sign in to comment.