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

Only allow valid Id s to be constructed #7

Merged
merged 1 commit into from
Nov 17, 2020
Merged

Only allow valid Id s to be constructed #7

merged 1 commit into from
Nov 17, 2020

Conversation

timokroeger
Copy link
Owner

Use newtypes for the enum variants so they cannot be constructed
anymore. Implement the From trait for the variants to access the id
value as integer.

Use newtypes for the enum variants so they cannot be constructed
anymore. Implement the `From` trait for the variants to access the id
value as integer.
timokroeger added a commit to timokroeger/pcan-basic-rs that referenced this pull request Nov 15, 2020
timokroeger added a commit to timokroeger/stm32f1xx-hal that referenced this pull request Nov 15, 2020
@timokroeger
Copy link
Owner Author

Note to self: Update README.md implementation links before merging this PR.

@timokroeger timokroeger merged commit 4eac505 into master Nov 17, 2020
@timokroeger timokroeger deleted the id branch November 17, 2020 17:40
timokroeger added a commit to timokroeger/stm32f1xx-hal that referenced this pull request Nov 17, 2020
timokroeger added a commit to timokroeger/pcan-basic-rs that referenced this pull request Nov 17, 2020
timokroeger added a commit to timokroeger/embedded-hal that referenced this pull request Nov 17, 2020
Use newtypes for the enum variants so they cannot be constructed
anymore. Implement the `From` trait for the variants to access the id
value as integer.
timokroeger/embedded-can#7
timokroeger added a commit to timokroeger/embedded-hal that referenced this pull request Nov 18, 2020
Use newtypes for the enum variants so they cannot be constructed
anymore. Implement the `From` trait for the variants to access the id
value as integer.
timokroeger/embedded-can#7
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.

1 participant