Skip to content

Commit dd75c5d

Browse files
author
bors-servo
authored
Auto merge of servo#241 - servo:rgba-repr-c, r=nox
color: Make cssparser::RGBA #[repr(C)]. This will be useful for my efforts of avoiding intermediate representations in the style system. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/241) <!-- Reviewable:end -->
2 parents 6666620 + 83adcf5 commit dd75c5d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cssparser"
3-
version = "0.25.2"
3+
version = "0.25.3"
44
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
55

66
description = "Rust implementation of CSS Syntax Level 3"

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)