pgcentralfoundation / pgrx

Build Postgres Extensions with Rust!
Other
3.7k stars 249 forks source link

Added into_iter for anyarray #1851

Closed YohDeadfall closed 2 months ago

YohDeadfall commented 2 months ago

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 commented 2 months ago

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

workingjubilee commented 2 months ago

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

workingjubilee commented 2 months ago

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 commented 2 months ago

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