fix some rkyv impls
This commit is contained in:
parent
446b52d08f
commit
7cc885e861
|
@ -27,11 +27,15 @@ use std::mem;
|
||||||
/// A array-based statically sized matrix data storage.
|
/// A array-based statically sized matrix data storage.
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "rkyv-serialize-no-std",
|
feature = "rkyv-serialize-no-std",
|
||||||
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
|
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize),
|
||||||
|
archive(as = "Self", bound(archive = "
|
||||||
|
T: rkyv::Archive<Archived = T>,
|
||||||
|
[[T; R]; C]: rkyv::Archive<Archived = [[T; R]; C]>
|
||||||
|
"))
|
||||||
)]
|
)]
|
||||||
|
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||||
pub struct ArrayStorage<T, const R: usize, const C: usize>(pub [[T; R]; C]);
|
pub struct ArrayStorage<T, const R: usize, const C: usize>(pub [[T; R]; C]);
|
||||||
|
|
||||||
|
|
|
@ -150,11 +150,15 @@ pub type MatrixCross<T, R1, C1, R2, C2> =
|
||||||
/// some concrete types for `T` and a compatible data storage type `S`).
|
/// some concrete types for `T` and a compatible data storage type `S`).
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "rkyv-serialize-no-std",
|
feature = "rkyv-serialize-no-std",
|
||||||
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
|
derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize),
|
||||||
|
archive(as = "Self", bound(archive = "
|
||||||
|
S: rkyv::Archive<Archived = S>,
|
||||||
|
PhantomData<(T, R, C)>: rkyv::Archive<Archived = PhantomData<(T, R, C)>>
|
||||||
|
"))
|
||||||
)]
|
)]
|
||||||
|
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||||
pub struct Matrix<T, R, C, S> {
|
pub struct Matrix<T, R, C, S> {
|
||||||
/// The data storage that contains all the matrix components. Disappointed?
|
/// The data storage that contains all the matrix components. Disappointed?
|
||||||
|
|
|
@ -77,7 +77,7 @@ an optimized set of tools for computer graphics and physics. Those features incl
|
||||||
unused_variables,
|
unused_variables,
|
||||||
unused_mut,
|
unused_mut,
|
||||||
unused_parens,
|
unused_parens,
|
||||||
unused_qualifications,
|
// unused_qualifications,
|
||||||
rust_2018_idioms,
|
rust_2018_idioms,
|
||||||
rust_2018_compatibility,
|
rust_2018_compatibility,
|
||||||
future_incompatible,
|
future_incompatible,
|
||||||
|
|
Loading…
Reference in New Issue