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

Add #[must_use] to Rng::with_seed #46

Merged
merged 3 commits into from
Feb 1, 2023
Merged

Add #[must_use] to Rng::with_seed #46

merged 3 commits into from
Feb 1, 2023

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Jan 28, 2023

Hopefully, this will reduce confusion like #45.

warning: unused return value of `Rng::with_seed` that must be used
  --> tests/smoke.rs:35:5
   |
35 |     fastrand::Rng::with_seed(1);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this creates a new instance of `Rng`; if you want to initialize the thread-local generator, use `fastrand::seed()` instead

Verified

This commit was signed with the committer’s verified signature.
danepowell Dane Powell
@taiki-e taiki-e merged commit 8e91b8d into master Feb 1, 2023
@taiki-e taiki-e deleted the taiki-e/must-use branch February 1, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant