itertools
itertools copied to clipboard
GroupBy and Chunks do not provide owned iterator versions
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
.
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?