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

GroupBy and Chunks do not provide owned iterator versions #499

Open
Ten0 opened this issue Dec 2, 2020 · 1 comment · May be fixed by #500
Open

GroupBy and Chunks do not provide owned iterator versions #499

Ten0 opened this issue Dec 2, 2020 · 1 comment · May be fixed by #500

Comments

@Ten0
Copy link
Contributor

Ten0 commented Dec 2, 2020

Calling iterator.chunks(10).into_iter() (or similar with GroupBy) returns something that references a temporary value, and can't be used as owned. This is often unexpected as it does not respect the usual contract of the .into_iter() functions, but is also a blocker when you need to write generic code that takes an iterator, and return some other form of Iterator based on GroupBy.

@erichCompSci
Copy link

Hi, this issue is still open, but I would like to help close it. I've made changes to the branch to fix the offending issue, but I need help as I am a little unfamiliar with the proper way to do all of this. Can someone please advise?

ggutoski added a commit to EspressoSystems/jellyfish that referenced this issue Sep 28, 2023
ggutoski added a commit to EspressoSystems/jellyfish that referenced this issue Oct 4, 2023
mrain pushed a commit to EspressoSystems/jellyfish that referenced this issue Oct 9, 2023
* derive common bounds for VidDisperse

* more downstream-friendly derivations for VidDisperse

* make itertools a workspace dep

* WIP can't use itertools because rust-itertools/itertools#499

* BytesToField and FieldToBytes iterators pass tests, lots of cleanup todo

* add large test length 5000, separate test for bytes_field_elems2, remove println

* make bytes_to_field2 generic over Borrow<u8>

* rename bytes_to_field2 -> bytes_to_field, etc

* cargo fmt, cargo clippy

* comments

* test for zero-length input

* 0-length input -> 0-length output

* refactor elem_to_usize

* refactor elem_to_bytes_iter

* make bytes_from_field generic over Borrow<F>

* test for iterators over both (u8, F) and (&u8, &F)

* fix infallibility test for bytes_from_field

* WIP disperse() take iterator, tests fail because commit() still does not

* WIP commit() take iterator, tests fail because recover() still does not

* WIP recover_payload() use bytes_from_field, tests fail due to a bug

* rename: add 'invertible'

* new alternate simpler bytes_to_field

* fix: add elems_len to common so as to discard excess elements returned by RS decoding

* remove simpler bytes_to_field (boo)

* rename: remove invertible from bytes_to_field name

* update CHANGELOG

* update flake.lock, fix flake.nix

* clippy appeasement

* iterate elems directly into polynomials in commit_only

* iterate elems directly into polynomials in disperse_from_elems
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 a pull request may close this issue.

2 participants