summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-11-11 18:06:27 +0100
committerLibravatar GitHub <noreply@github.com>2020-11-11 18:06:27 +0100
commit73811c394a39c3816c67bffd2cf7d7a93c8803a9 (patch)
treebabd079fff2163d147d3d2cec429b17d04a1af9c /graphics/src
parent2f5a3dacd933a52931a1bb169138d52402413956 (diff)
parent0400f6716bfb7bcae7d7e464e79e400f3ccc2368 (diff)
downloadiced-73811c394a39c3816c67bffd2cf7d7a93c8803a9.tar.gz
iced-73811c394a39c3816c67bffd2cf7d7a93c8803a9.tar.bz2
iced-73811c394a39c3816c67bffd2cf7d7a93c8803a9.zip
Merge pull request #610 from hecrj/improvement/update-dependencies
Update dependencies
Diffstat (limited to 'graphics/src')
-rw-r--r--graphics/src/triangle.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/graphics/src/triangle.rs b/graphics/src/triangle.rs
index ce879ffc..eb1494b1 100644
--- a/graphics/src/triangle.rs
+++ b/graphics/src/triangle.rs
@@ -1,4 +1,5 @@
//! Draw geometry using meshes of triangles.
+use bytemuck::{Pod, Zeroable};
/// A set of [`Vertex2D`] and indices representing a list of triangles.
///
@@ -16,7 +17,7 @@ pub struct Mesh2D {
}
/// A two-dimensional vertex with some color in __linear__ RGBA.
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, Zeroable, Pod)]
#[repr(C)]
pub struct Vertex2D {
/// The vertex position
@@ -24,9 +25,3 @@ pub struct Vertex2D {
/// The vertex color in __linear__ RGBA.
pub color: [f32; 4],
}
-
-#[allow(unsafe_code)]
-unsafe impl bytemuck::Zeroable for Vertex2D {}
-
-#[allow(unsafe_code)]
-unsafe impl bytemuck::Pod for Vertex2D {}