Skip to content

Commit de6af81

Browse files
committed
Fixed build on Rust 1.0
1 parent 367fd2f commit de6af81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/distributions/poisson.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Poisson {
4343
/// `lambda`. Panics if `lambda <= 0`.
4444
pub fn new(lambda: f64) -> Poisson {
4545
assert!(lambda > 0.0, "Poisson::new called with `lambda` <= 0");
46-
Poisson {
46+
Poisson {
4747
lambda: lambda,
4848
exp_lambda: (-lambda).exp(),
4949
log_lambda: lambda.ln(),
@@ -64,7 +64,7 @@ impl IndependentSample<u64> for Poisson {
6464
let mut result = 0;
6565
let mut p = 1.0;
6666
while p > self.exp_lambda {
67-
p *= rng.gen();
67+
p *= rng.gen::<f64>();
6868
result += 1;
6969
}
7070
result - 1

0 commit comments

Comments
 (0)