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

Use sealed traits instead of unsafe markers on traits #45

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

9names
Copy link
Collaborator

@9names 9names commented Feb 20, 2023

Uses the sealed trait pattern from
https://rust-lang.github.io/api-guidelines/future-proofing.html

i2c and spi traits are well constrained already, haven't worked out the correct syntax for serial.
it's probably overkill, since you can't construct a uart without uart pins, and they are already constrained.

[edit]
Decided not to seal uart trait due to above

@9names 9names changed the title Use sealed traits instead of unsafe markers on traits WIP: Use sealed traits instead of unsafe markers on traits Feb 20, 2023
@9names 9names force-pushed the use-sealed-traits branch 2 times, most recently from 4b1d00f to 27b5ec6 Compare January 10, 2024 08:13
@9names 9names force-pushed the use-sealed-traits branch from 27b5ec6 to b7baafe Compare January 10, 2024 08:17
@9names 9names changed the title WIP: Use sealed traits instead of unsafe markers on traits Use sealed traits instead of unsafe markers on traits Jan 10, 2024
@9names 9names marked this pull request as ready for review January 10, 2024 08:17
@9names 9names merged commit c9f660e into sipeed:main Jan 10, 2024
4 checks passed
@9names 9names deleted the use-sealed-traits branch January 10, 2024 09:34
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