FIx serde impl bounds

This commit is contained in:
CAD97 2021-07-09 15:30:06 -05:00
parent 314b4dd103
commit 85d07b22a3
2 changed files with 6 additions and 4 deletions

View File

@ -60,13 +60,15 @@ use crate::geometry::{AbstractRotation, Point, Translation};
feature = "serde-serialize-no-std", feature = "serde-serialize-no-std",
serde(bound(serialize = "R: Serialize, serde(bound(serialize = "R: Serialize,
DefaultAllocator: Allocator<T, Const<D>>, DefaultAllocator: Allocator<T, Const<D>>,
Owned<T, Const<D>>: Serialize")) Owned<T, Const<D>>: Serialize,
T: Scalar"))
)] )]
#[cfg_attr( #[cfg_attr(
feature = "serde-serialize-no-std", feature = "serde-serialize-no-std",
serde(bound(deserialize = "R: Deserialize<'de>, serde(bound(deserialize = "R: Deserialize<'de>,
DefaultAllocator: Allocator<T, Const<D>>, DefaultAllocator: Allocator<T, Const<D>>,
Owned<T, Const<D>>: Deserialize<'de>")) Owned<T, Const<D>>: Deserialize<'de>,
T: Scalar"))
)] )]
pub struct Isometry<T, R, const D: usize> { pub struct Isometry<T, R, const D: usize> {
/// The pure rotational part of this isometry. /// The pure rotational part of this isometry.

View File

@ -27,14 +27,14 @@ use crate::geometry::{AbstractRotation, Isometry, Point, Translation};
#[cfg_attr(feature = "serde-serialize-no-std", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde-serialize-no-std", derive(Serialize, Deserialize))]
#[cfg_attr( #[cfg_attr(
feature = "serde-serialize-no-std", feature = "serde-serialize-no-std",
serde(bound(serialize = "T: Serialize, serde(bound(serialize = "T: Scalar + Serialize,
R: Serialize, R: Serialize,
DefaultAllocator: Allocator<T, Const<D>>, DefaultAllocator: Allocator<T, Const<D>>,
Owned<T, Const<D>>: Serialize")) Owned<T, Const<D>>: Serialize"))
)] )]
#[cfg_attr( #[cfg_attr(
feature = "serde-serialize-no-std", feature = "serde-serialize-no-std",
serde(bound(deserialize = "T: Deserialize<'de>, serde(bound(deserialize = "T: Scalar + Deserialize<'de>,
R: Deserialize<'de>, R: Deserialize<'de>,
DefaultAllocator: Allocator<T, Const<D>>, DefaultAllocator: Allocator<T, Const<D>>,
Owned<T, Const<D>>: Deserialize<'de>")) Owned<T, Const<D>>: Deserialize<'de>"))