mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-30 14:00:29 +00:00
Merge pull request #606 from Mortano/union-repr
Fix memory layout of UnionNode<T> in pool module
This commit is contained in:
commit
ceb3fc06ba
@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- CI now uses flags specified in `Cargo.toml` for `rustdoc` tests.
|
||||
- Fixed clippy lints.
|
||||
- Fixed the memory layout of the internal `UnionNode<T>` type, fixing possible Undefined Behaviour.
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -44,6 +44,7 @@ pub trait Node: Sized {
|
||||
fn next_mut(&mut self) -> &mut AtomicPtr<Self>;
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub union UnionNode<T> {
|
||||
next: ManuallyDrop<AtomicPtr<UnionNode<T>>>,
|
||||
pub data: ManuallyDrop<T>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user