Skip to content

Derive transparent #857

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

Merged
merged 1 commit into from
Dec 30, 2021
Merged

Derive transparent #857

merged 1 commit into from
Dec 30, 2021

Conversation

malobre
Copy link
Contributor

@malobre malobre commented Dec 29, 2021

#[postgres(transparent)]

Acknowledgments

Example

#[derive(ToSql, FromSql)]
#[postgres(transparent)]
struct UserId(i32);

@sfackler
Copy link
Owner

Nice! Would also be good to have a few quick tests.

@malobre
Copy link
Contributor Author

malobre commented Dec 30, 2021

I added basic tests and updated some of the logic.

@malobre malobre marked this pull request as ready for review December 30, 2021 19:20
@sfackler
Copy link
Owner

Can you add a little bit of docs to the postgres-types crate?

LTGM otherwise!

@malobre
Copy link
Contributor Author

malobre commented Dec 30, 2021

I added documentation and squashed all the commits into one.
Edit: Had to squash again, I missed one of your comment.

@sfackler sfackler merged commit 774016d into sfackler:master Dec 30, 2021
@malobre malobre deleted the feature/derive-transparent branch December 30, 2021 23:10
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.

2 participants