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

Type-safe voltage and current units #15

Merged
merged 2 commits into from
May 23, 2024
Merged

Type-safe voltage and current units #15

merged 2 commits into from
May 23, 2024

Conversation

fmckeogh
Copy link
Owner

@fmckeogh fmckeogh commented May 20, 2024

Closes #1

@bentwire
Copy link
Contributor

Ok this is great!

@fmckeogh
Copy link
Owner Author

I’m a bit worried it’s overkill, and that ElectricPotential is harder to follow than if we just had a Millivolts(u16) type.

I could try a type alias for Volts, Amps, etc?

@fmckeogh fmckeogh merged commit a8c7ab6 into main May 23, 2024
4 checks passed
@fmckeogh fmckeogh deleted the units branch May 23, 2024 06:01
okhsunrog added a commit to okhsunrog/usb-pd-rs that referenced this pull request Jun 18, 2024
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.

Add units to avoid conversion errors
2 participants