Update bytemuck dependency in iced_graphics

This commit is contained in:
Héctor Ramón Jiménez 2020-11-10 20:11:23 +01:00
parent 9d4f664c94
commit 45c749f28c
2 changed files with 6 additions and 8 deletions

View file

@ -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 {}