Skip to content

Conversation

@deweyx
Copy link
Contributor

@deweyx deweyx commented Oct 31, 2025

Pastebin example uses now deprecated rand::gen() which was changed due to the reserved gen keyword in Rust 2024 edition.

Rather than changing dependencies or updating the guide to specify an older edition, I've updated to use gen_range (should be best practice to avoid an infinitesimal bias anyway). This should work with any edition.

Also fixed typos I noticed in the CONTRIBUTING doc.

@deweyx deweyx changed the title avoid new gen keyword in pastebin example; couple of typo fixes Update pastebin example to avoid new gen reserved keyword; couple of typo fixes Oct 31, 2025
@the10thWiz the10thWiz merged commit 3a54d07 into rwf2:master Dec 28, 2025
martynp pushed a commit to rocket-rs-community/Rocket that referenced this pull request Dec 29, 2025
Pastebin example uses now deprecated `rand::gen()` which was changed due
to the reserved `gen` keyword in Rust 2024 edition.

Rather than changing dependencies or updating the guide to specify an
older edition, I've updated to use `gen_range` (should be best practice
to avoid an infinitesimal bias anyway). This should work with any
edition.

---------

Co-authored-by: Daniel Welsh <danielw2000@gmail.com>
Co-authored-by: Matthew Pomes <matthew.pomes@pm.me>
martynp pushed a commit to rocket-rs-community/Rocket that referenced this pull request Dec 30, 2025
Pastebin example uses now deprecated `rand::gen()` which was changed due
to the reserved `gen` keyword in Rust 2024 edition.

Rather than changing dependencies or updating the guide to specify an
older edition, I've updated to use `gen_range` (should be best practice
to avoid an infinitesimal bias anyway). This should work with any
edition.

---------

Co-authored-by: Daniel Welsh <danielw2000@gmail.com>
Co-authored-by: Matthew Pomes <matthew.pomes@pm.me>
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.

3 participants