Skip to content

Commit c58278f

Browse files
committed
color: Make cssparser::RGBA #[repr(C)].
This will be useful for my efforts of avoiding intermediate representations in the style system.
1 parent 6666620 commit c58278f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/color.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
1212

1313
/// A color with red, green, blue, and alpha components, in a byte each.
1414
#[derive(Clone, Copy, PartialEq, Debug)]
15+
#[repr(C)]
1516
pub struct RGBA {
1617
/// The red component.
1718
pub red: u8,

0 commit comments

Comments
 (0)