Closed ndebuhr closed 3 years ago
This is ready from my side, I'll merge it tomorrow so others have a chance to take a look.
Correct casting is an under-appreciated problem in Rust, but at least as
gets this right (or "good enough") now. I'm actually considering releasing a new library for this (see this code) since none of the current ones do what I want.
But this change looks fine to me :+1:
@vks Also not the same thing, especially convenient unwrap-by-default syntax. If you need a lot of conversions and the choice is x as y
or y::conv_from(x).unwrap()
, which are you likely to reach for? There's also num_traits
and cast
; the latter does at least try for convenient syntax, though perhaps not clear enough syntax.
This PR expands the Poisson documentation:
https://github.com/rust-random/rand/issues/1093