diff --git a/src/geometry/point.rs b/src/geometry/point.rs index dfbd2f88..e65bc535 100644 --- a/src/geometry/point.rs +++ b/src/geometry/point.rs @@ -85,6 +85,7 @@ where impl Serialize for OPoint where DefaultAllocator: Allocator, + >::Buffer: Serialize { fn serialize(&self, serializer: S) -> Result where @@ -98,12 +99,13 @@ where impl<'a, T: Scalar + Deserialize<'a>, D: DimName> Deserialize<'a> for OPoint where DefaultAllocator: Allocator, + >::Buffer: Deserialize<'a> { fn deserialize(deserializer: Des) -> Result where Des: Deserializer<'a>, { - let coords = SVector::::deserialize(deserializer)?; + let coords = OVector::::deserialize(deserializer)?; Ok(Self::from(coords)) } diff --git a/src/geometry/point_construction.rs b/src/geometry/point_construction.rs index 03f24cdb..0ffbf4d8 100644 --- a/src/geometry/point_construction.rs +++ b/src/geometry/point_construction.rs @@ -168,7 +168,7 @@ where /// Generate a `Point` where each coordinate is an independent variate from `[0, 1)`. #[inline] fn sample<'a, G: Rng + ?Sized>(&self, rng: &mut G) -> OPoint { - Point::from(rng.gen::>()) + OPoint::from(rng.gen::>()) } }