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 Itertools::enumerate_ok #598

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

Conversation

NoneTheWisr
Copy link

@NoneTheWisr NoneTheWisr commented Jan 16, 2022

This work was done as an exercise in a group that studies Rust in the format of mob programming.

Please let us know whether this seems appropriate for the itertools crate.

By the way, if anyone would like to study Rust in the format of mob programming consider learning more about it here: https://mobusoperandi.zulipchat.com/

Co-authored-by: Saatvik Shah [email protected]
Co-authored-by: Roland Fredenhagen [email protected]
Co-authored-by: Shahar Dawn Or [email protected]
Co-authored-by: Preet Dua [email protected]

@NoneTheWisr NoneTheWisr marked this pull request as ready for review January 16, 2022 09:10
@scottmcm
Copy link
Contributor

Can you say more about why you think this particular combination is common enough to belong in itertools?

(The code itself is fine, though could be improved with a few things, such as size_hint.)

Squashed commit of the following:

commit 146fb0e
Author: NoneTheWisr <[email protected]>
Date:   Sun Jan 16 12:44:41 2022 +0400

    mob next [ci-skip] [ci skip] [skip ci]

commit aa2db90
Author: NoneTheWisr <[email protected]>
Date:   Sun Jan 16 12:19:55 2022 +0400

    mob next [ci-skip] [ci skip] [skip ci]

commit f473fee
Author: Saatvik Shah <[email protected]>
Date:   Sun Jan 16 09:09:32 2022 +0100

    mob next [ci-skip] [ci skip] [skip ci]

commit ff4628c
Author: Preet Dua <[email protected]>
Date:   Sat Jan 15 23:58:18 2022 -0800

    mob next [ci-skip] [ci skip] [skip ci]

commit 90bdeb6
Author: NoneTheWisr <[email protected]>
Date:   Sun Jan 16 11:46:53 2022 +0400

    mob next [ci-skip] [ci skip] [skip ci]

commit 7044ed3
Author: Shahar Dawn Or <[email protected]>
Date:   Sat Jan 15 16:58:27 2022 +0700

    mob next [ci-skip] [ci skip] [skip ci]

commit 659639e
Author: NoneTheWisr <[email protected]>
Date:   Sat Jan 15 13:54:21 2022 +0400

    mob next [ci-skip] [ci skip] [skip ci]

commit a305d97
Author: Preet Dua <[email protected]>
Date:   Sat Jan 15 01:43:33 2022 -0800

    mob next [ci-skip] [ci skip] [skip ci]

commit f08c2af
Author: Roland Fredenhagen <[email protected]>
Date:   Sat Jan 15 10:33:59 2022 +0100

    mob next [ci-skip] [ci skip] [skip ci]

commit 48bd032
Author: Shahar Dawn Or <[email protected]>
Date:   Sat Jan 15 16:22:06 2022 +0700

    mob next [ci-skip] [ci skip] [skip ci]

commit db02884
Author: NoneTheWisr <[email protected]>
Date:   Sat Jan 15 13:10:44 2022 +0400

    mob next [ci-skip] [ci skip] [skip ci]

Co-authored-by: Saatvik Shah <[email protected]>
Co-authored-by: Roland Fredenhagen <[email protected]>
Co-authored-by: Shahar Dawn Or <[email protected]>
Co-authored-by: Preet Dua <[email protected]>
@mightyiam
Copy link
Contributor

@scottmcm here's an example. I hope it's not made too unreadable by the awkward attempt at de-duplication which turned out to produce quite a bit of type-wrangling:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1bab9bc0bfa8e4d7e6a314a7bac7df7a

@Philippe-Cholet Philippe-Cholet added the fallible-iterator Iterator of results/options label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fallible-iterator Iterator of results/options
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants