Skip to content
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

Update rand-range.md #630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mingscraft
Copy link

@mingscraft mingscraft commented Jan 1, 2021

fixes #631 incorrect usage of rng.gen_range

Things to check before submitting a PR

  • the tests are passing locally with cargo test
  • cookbook renders correctly in mdbook serve -o
  • commits are squashed into one and rebased to latest master
  • PR contains correct "fixes #ISSUE_ID" clause to autoclose the issue on PR merge
    • if issue does not exist consider creating it or remove the clause
  • spell check runs without errors ./ci/spellcheck.sh
  • link check runs without errors link-checker ./book
  • non rendered items are in sorted order (links, reference, identifiers, Cargo.toml)
  • links to docs.rs have wildcard version https://docs.rs/tar/*/tar/struct.Entry.html
  • example has standard error handling
  • code identifiers in description are in hyperlinked backticks
[`Entry::unpack`]: https://docs.rs/tar/*/tar/struct.Entry.html#method.unpack

Things to do after submitting PR

  • check if CI is happy with your PR

Thank you for reading, you may now delete this text! Thank you! 😄

fix incorrect usage of rng.gen_range
@djc
Copy link
Contributor

djc commented Mar 17, 2021

This has been fixed in #627, and can be closed.

jamesgraves added a commit to jamesgraves/rust-cookbook that referenced this pull request Feb 16, 2022
Moving away from using skeptic. Instead code will live as regular
Rust source code example files in their own directory, and the
Markdown will just include those source files.

The main reason for doing this is to avoid a bug in skeptic that
will try to compile test functions against the incorrect version
of a dependent crate.

See:

budziq/rust-skeptic#111

rust-lang-nursery#630

With this change, the rand examples will just depend upon a few
other crates.  Also, for testing or general evaluation, a user
may clone this entire repository, just go into the examples and
run and modify them easily.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code error in example: "Generate random numbers within a range"
2 participants