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

Added into_iter for anyarray #1851

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

YohDeadfall
Copy link
Contributor

Fixes #1832.

The implementation isn't what I want, but it adds into_iter for &AnyArray and I hope unblocking @thomcc. Later it would be better to get rid of AnyArray in its current state and use Array<AnyElement> instead, I will investigate that possibility. But for now that is how it is and without any breaking change.

@YohDeadfall
Copy link
Contributor Author

Should there be a consuming iterator or this one is enough?

@workingjubilee
Copy link
Member

honestly I expected IntoIterator would have been for AnyArray and be consuming, yeah.

@workingjubilee
Copy link
Member

workingjubilee commented Sep 11, 2024

Also, to be clear, Array<'a, T> has some complicated reasons why it's also Kinda Bad that are outside the scope of this PR, so I'm not too fussed right now.

@workingjubilee
Copy link
Member

We discussed this and this is probably fine as-is.

@workingjubilee workingjubilee merged commit 86c6a0f into pgcentralfoundation:develop Sep 11, 2024
14 checks passed
@YohDeadfall YohDeadfall deleted the anyarray-iter branch September 11, 2024 15:22
daamien pushed a commit to daamien/pgrx that referenced this pull request Sep 12, 2024
Fixes pgcentralfoundation#1832.

The implementation isn't what I want, but it adds `into_iter` for
`&AnyArray` and I hope unblocking thomcc. Later it would be better to
get rid of `AnyArray` in its current state and use `Array<AnyElement>`
instead, I will investigate that possibility. But for now that is how it
is and without any breaking change.
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.

AnyArray should be iterable
2 participants