Merge pull request #224 from Tuetuopay/pod-arrays

aya: implement Pod for arrays of Pod types
pull/239/head
Alessandro Decina 3 years ago committed by GitHub
commit 02c376ceb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,6 +54,9 @@ macro_rules! unsafe_impl_pod {
unsafe_impl_pod!(i8, u8, i16, u16, i32, u32, i64, u64, u128, i128); 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)] #[allow(non_camel_case_types)]
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone, Debug, Default, PartialEq)] #[derive(Copy, Clone, Debug, Default, PartialEq)]

Loading…
Cancel
Save