vapor / postgres-nio

🐘 Non-blocking, event-driven Swift client for PostgreSQL.
https://api.vapor.codes/postgresnio/documentation/postgresnio/
MIT License
322 stars 75 forks source link

Fix `PostgresDecodable` inference for `RawRepresentable` enums #423

Closed MahdiBM closed 11 months ago

MahdiBM commented 11 months ago

The function in extension responsible for making PostgresDecodable work with RawRepresentable, was not marked as public.

I added an integration test to make sure this now functions as expected.

I also removed the @testable in the IntegrationsTests since it wasn't needed and it would also manipulate Codable behaviors. If there is an internal extension for Codable, @testable makes it so the tests will use that while the public will not be able to use that, which will either result in unexpected compile errors for users, or different behavior in test vs what users see.

gwynne commented 11 months ago

Looks fine to me, but I defer to @fabianfett in case this wasn't accidental.