Skip to content

Conversation

@damyanp
Copy link

@damyanp damyanp commented Jan 31, 2026

Some libraries (eg clack) require ExactSizeIterators rather than plain Iterators.

This change makes all the methods that return impl Iterator return ExactSizeIterator instead to enable easier interop with these libraries.

@damyanp
Copy link
Author

damyanp commented Jan 31, 2026

This allowed me to remove this workaround: damyanp/corodaw@af9f549

fn channels_iter(&self) -> impl Iterator<Item = impl Iterator<Item = &S> + '_> + '_ {
fn channels_iter(
&self,
) -> impl '_ + ExactSizeIterator<Item = impl '_ + ExactSizeIterator<Item = &S>>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think that this change is worth taking, I can go through and clean these up (these are artifacts from using clippy --fix).

Suggested change
) -> impl '_ + ExactSizeIterator<Item = impl '_ + ExactSizeIterator<Item = &S>>
) -> impl ExactSizeIterator<Item = impl ExactSizeIterator<Item = &S> + '_ > + '_

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.

1 participant