Skip to content

Implement TrustedLen and FusedIterator for DistIter - #620

Merged
dhardy merged 1 commit into
rust-random:masterfrom
dhardy:fused
Oct 3, 2018
Merged

dhardy merged 1 commit into
rust-random:masterfrom
dhardy:fused

Conversation

@dhardy

@dhardy dhardy commented Oct 3, 2018

Copy link
Copy Markdown
Member

Fixes #618

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

burdges commented Oct 3, 2018

Copy link
Copy Markdown
Contributor

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

dhardy commented Oct 3, 2018

Copy link
Copy Markdown
Member Author

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.

2 participants