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

Implement TrustedLen and FusedIterator for DistIter #620

Merged
merged 1 commit into from Oct 3, 2018

Conversation

dhardy
Copy link
Member

@dhardy dhardy commented Oct 3, 2018

Fixes #618

@dhardy dhardy merged commit fbd9ec3 into rust-random:master Oct 3, 2018
@burdges
Copy link
Contributor

burdges commented Oct 3, 2018

ReadRng does not itself satisfy either TrustedLen or FusedIterator, right? It's okay because DistIter panics instead of propagating those errors though I guess.

@dhardy
Copy link
Member Author

dhardy commented Oct 3, 2018

Panic is basically a type-safe way of avoiding the usual guarantees on return values — be it an "unexpected" failure of a supposedly infinite iterator, or a failure to allocate a new Box etc. So I see no issue here.

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.

None yet

2 participants