We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Now that the standard library NonZeroXXX types have been stabilized, Standard should support them.
NonZeroXXX
Standard
The text was updated successfully, but these errors were encountered:
In the meantime, this should work:
let distr = Uniform::new_inclusive(1, u32::max_value()); let sample = rng.sample(distr); NonZeroU32::new(sample) // or NonZeroI32::new(sample as i32)
Sorry, something went wrong.
@TheIronBorn Cool, thanks!
No branches or pull requests
Now that the standard library
NonZeroXXX
types have been stabilized,Standard
should support them.The text was updated successfully, but these errors were encountered: