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

Add into_inner for wrapper types, and derive some more traits` #52

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

alamb
Copy link
Collaborator

@alamb alamb commented Mar 21, 2025

Inspired by @scsmithr's comments #50 (review)

We now have date and decimal so called "newtype" wrappers around i32/i64 that allow formatting into a single location

Right now it is easy to go from i32 -> newtype, but not the other way around

Typically, there is a function in rust programs into_inner that does the conversion.

We could also consider adding From impls, but I think these functions are more explicit and we can add from impls later

I also added some more derive traits while I was at it

Copy link
Contributor

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

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

lgtm

@alamb
Copy link
Collaborator Author

alamb commented Mar 21, 2025

Thanks for the review @scsmithr

@alamb alamb merged commit e639363 into clflushopt:main Mar 21, 2025
2 checks passed
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