We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4551f95 commit dd95b98Copy full SHA for dd95b98
src/lib.rs
@@ -51,10 +51,11 @@ struct HeaderVecHeader<H> {
51
len: usize,
52
}
53
54
-// This union will be properly aligned and sized to store headers followed by T's.
55
-union AlignedHeader<H, T> {
56
- _header: ManuallyDrop<HeaderVecHeader<H>>,
57
- _data: ManuallyDrop<[T; 0]>,
+// This struct will be properly aligned and sized to store headers followed by T's.
+#[repr(C)]
+struct AlignedHeader<H, T> {
+ align: [T; 0],
58
+ header: HeaderVecHeader<H>,
59
60
61
/// A vector with a header of your choosing behind a thin pointer
0 commit comments