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 DoubleEndedIterator to U32Digits and U64Digits #208

Merged
merged 5 commits into from Aug 27, 2021

Conversation

PatrickNorton
Copy link
Contributor

@PatrickNorton PatrickNorton commented Jul 22, 2021

Since U32Digits and U64Digits do not implement DoubleEndedIterator, there is currently no easy way to iterate over the digits in a big-ended fashion.

@cuviper
Copy link
Member

cuviper commented Jul 27, 2021

Since U32Digits and U64Digits do not implement DoubleEndedIterator,

Did you explore what it would take to add that implementation instead?

@PatrickNorton
Copy link
Contributor Author

I'd thought about it a little but went with this instead -- doing a quick mockup, it looks like that won't be as difficult as I first thought, so I'll give it a go.

@PatrickNorton
Copy link
Contributor Author

It's definitely a lot cleaner than I expected; I think we should go that route instead.

@PatrickNorton PatrickNorton changed the title Add `iter_{u32, u64}_digits_be() methods Add DoubleEndedIterator to U32Digits and U64Digits Jul 28, 2021
@PatrickNorton
Copy link
Contributor Author

@cuviper Thoughts on the new implementation?

@cuviper
Copy link
Member

cuviper commented Aug 27, 2021

It looks good to me, thanks!

bors r+

bors bot added a commit that referenced this pull request Aug 27, 2021
208: Add `DoubleEndedIterator` to `U32Digits` and `U64Digits` r=cuviper a=PatrickNorton

Since `U32Digits` and `U64Digits` do not implement `DoubleEndedIterator`, there is currently no easy way to iterate over the digits in a big-ended fashion.

Co-authored-by: Patrick Norton <patrick.147.norton@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 27, 2021

Build failed:

@cuviper
Copy link
Member

cuviper commented Aug 27, 2021

Hmm, that failure with arbitrary is not your fault -- I'll see what I can do about this...

@cuviper
Copy link
Member

cuviper commented Aug 27, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 27, 2021

@bors bors bot merged commit 3753602 into rust-num:master Aug 27, 2021
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