Add safety comment that was missed

This commit is contained in:
Ross Smyth 2022-08-13 15:40:32 -04:00
parent 80f14f61df
commit c42b8ad91b
No known key found for this signature in database
GPG key ID: F1090CED11840CA3

View file

@ -12,6 +12,10 @@ pub struct Quad {
pub border_width: f32,
}
// Safety: Pod's contract says the type must
// not have any padding, and must be repr(C).
// As currrently defined, Quad does not have
// any padding.
unsafe impl bytemuck::Pod for Quad {}
unsafe impl bytemuck::Zeroable for Quad {}