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 stronger types #11

Merged
merged 3 commits into from Aug 4, 2022
Merged

Add stronger types #11

merged 3 commits into from Aug 4, 2022

Conversation

naconnors
Copy link
Collaborator

I added stronger typing to the Reading struct. The types used were mostly dictated by the Rust to Postgresql type mapping that Diesel implements.
I removed some test that were no longer valid. I didn't replace any since I felt the type system was already doing basically the same sort of checks. If you have any suggestions on additional tests that you think should be added then let me know.

This has been tested against ambi (Elixir) and the initial implementation of ambi-rs that is still in PR. It could successfully post readings to both.

@naconnors naconnors marked this pull request as draft July 29, 2022 01:42
@naconnors
Copy link
Collaborator Author

I need to convert dust_concentration to f64 instead of i32 to match the original type in ambi.

@naconnors naconnors marked this pull request as ready for review July 30, 2022 01:13
@jhodapp jhodapp added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 4, 2022
Copy link
Contributor

@jhodapp jhodapp left a comment

Choose a reason for hiding this comment

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

LGTM

@naconnors naconnors merged commit 9937b55 into master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants