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

arbitrary: add fill_slice method for AsMut<[T: Arbitrary]> #292

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

Conversation

cyphar
Copy link

@cyphar cyphar commented May 23, 2021

This allows users to fairly easily migrate from CoreRng::fill_byte() and
similar constructions without requiring them to fuss around with a new
SeedableRng (or copy-paste this boilerplate) when their slice is just
full of Arbitrary-able types.

Fixes #291
Signed-off-by: Aleksa Sarai [email protected]

@cyphar cyphar changed the title arbitrary: add fill_slice method for AsRef<[T: Abitrary]> arbitrary: add fill_slice method for AsRef<[T: Arbitrary]> May 23, 2021
@cyphar cyphar force-pushed the arbitrary-slice_fill branch 2 times, most recently from 07a572c to 41d3d47 Compare May 23, 2021 01:54
@cyphar cyphar changed the title arbitrary: add fill_slice method for AsRef<[T: Arbitrary]> arbitrary: add fill_slice method for AsMut<[T: Arbitrary]> May 23, 2021
This allows users to fairly easily migrate from CoreRng::fill_byte() and
similar constructions without requiring them to fuss around with a new
SeedableRng (or copy-paste this boilerplate) when their slice is just
full of Arbitrary-able types.

Signed-off-by: Aleksa Sarai <[email protected]>
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.

Implement Arbitrary for AsMut<[T: Arbitrary]>
1 participant