From af448d2c707dd9b6d63a157131725e135ff19cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crozet=20S=C3=A9bastien?= Date: Thu, 25 Feb 2021 14:19:20 +0100 Subject: [PATCH] Add bytemuck impls to points. --- src/geometry/point.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/geometry/point.rs b/src/geometry/point.rs index 75410ccd..390db80b 100644 --- a/src/geometry/point.rs +++ b/src/geometry/point.rs @@ -65,6 +65,24 @@ where { } +#[cfg(feature = "bytemuck")] +unsafe impl bytemuck::Zeroable for Point +where + VectorN: bytemuck::Zeroable, + DefaultAllocator: Allocator, +{ +} + +#[cfg(feature = "bytemuck")] +unsafe impl bytemuck::Pod for Point +where + N: Copy, + VectorN: bytemuck::Pod, + DefaultAllocator: Allocator, + >::Buffer: Copy, +{ +} + #[cfg(feature = "serde-serialize")] impl Serialize for Point where