-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documentation issues #1225
Comments
A perfect solution for me at least I think is if someone added: "this is how your Cargo.toml must look like to run EVERY sample code block inside this book: ..." |
So, rand = { version = "0.8", features = ["small_rng"] }
rand_chacha = "0.3" Then, you can e.g.: use rand_chacha::ChaCha8Rng; Does this answer your questions? If so, it would be useful to get more specific feedback on how to include this in the book (or even if you make a pull request yourself: https://github.com/rust-random/book/pulls). My perspective is a little different than yours, hence it's not always obvious to me what is missing. |
Thanks!, |
Background
rustc 1.59.0
When Learning to use "rand" I tend to end up in a loop of frustration that I must address.
In my quest as a (rust) newbie I tried following the code snippets in your book , I end up with "failed to resolve" at times :
Rand Book
StdGen snippets works fine,
But how do I "use" SmallRng or ChaCha20Rng, usually "failed to resolve" no matter what I try.
I seems my Cargo.toml / dependencies is missing something, or is it the sample snippet missing "use" ?
How many dependencies (with options) do I need for each sample snippet.. could this be more specific perhaps?
The text was updated successfully, but these errors were encountered: