Skip to content

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Nov 1, 2025

... instead of a Box<dyn RngCore>.

This change has two benefits:

  • It removes turmoil's public dependency on the rand crate, making it easier to upgrade that crate in the future.
  • It cleans up the Builder API by not having two separate build* methods.

This is a breaking change, though the hope is that it reduces the need for future breaking changes. For example, #215 would not be a breaking change with this new API.

... instead of a `Box<dyn RngCore>`.

This change has two benefits:

 * It removes turmoil's public dependency on the `rand` crate, making it
   easier to upgrade that crate in the future.
 * It cleans up the `Builder` API by not having two separate `build*`
   methods.

This is a breaking change, though the hope is that it reduces the need
for future breaking changes.
@teskje
Copy link
Contributor Author

teskje commented Nov 1, 2025

CI fails because it correctly detects the breaking change.

@teskje teskje marked this pull request as ready for review November 1, 2025 15:39
@teskje teskje mentioned this pull request Nov 1, 2025
Copy link
Contributor

@mcches mcches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea.

@mcches mcches merged commit a242a2a into tokio-rs:main Nov 3, 2025
4 of 5 checks passed
@teskje teskje deleted the builder-rng-seed branch November 4, 2025 09:10
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.

2 participants