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

Replace casts of &T to &mut T with UnsafeCell #451

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

richardeoin
Copy link
Member

Specifically we cast *const T to *const UnsafeCell<T> then use the UnsafeCell::raw_get method.

Specifically we cast *const T to *const UnsafeCell<T> then use the
[UnsafeCell::raw_get](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.raw_get)
method
@richardeoin
Copy link
Member Author

Casts of &T to &mut T are UB. Caught by this lint.

@richardeoin
Copy link
Member Author

Changes to the SPI implementation validated on hardware

@richardeoin richardeoin added this pull request to the merge queue Sep 17, 2023
Merged via the queue into stm32-rs:master with commit d9af4a6 Sep 17, 2023
22 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.

1 participant