aya: implement Pod for arrays of Pod types

If a type is POD (meaning it can be converted to a byte array), then an
array of such type is POD.

Signed-off-by: Tuetuopay <tuetuopay@me.com>
pull/224/head
Tuetuopay 3 years ago
parent 5cfecbdd8e
commit 08211f6132

@ -54,6 +54,9 @@ macro_rules! unsafe_impl_pod {
unsafe_impl_pod!(i8, u8, i16, u16, i32, u32, i64, u64, u128, i128);
// It only makes sense that an array of POD types is itself POD
unsafe impl<T: Pod, const N: usize> Pod for [T; N] {}
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, PartialEq)]

Loading…
Cancel
Save