Skip to content

Commit 79d0cf5

Browse files
committed
Color struct no longer need to be repr(C)
1 parent dc39bd5 commit 79d0cf5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/color.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ fn normalize_hue(hue: f32) -> f32 {
6060

6161
/// A color with red, green, blue, and alpha components, in a byte each.
6262
#[derive(Clone, Copy, PartialEq, Debug)]
63-
#[repr(C)]
6463
pub struct RGBA {
6564
/// The red component.
6665
pub red: Option<u8>,
@@ -287,7 +286,6 @@ impl<'de> Deserialize<'de> for Hwb {
287286

288287
/// Color specified by lightness, a- and b-axis components.
289288
#[derive(Clone, Copy, PartialEq, Debug)]
290-
#[repr(C)]
291289
pub struct Lab {
292290
/// The lightness component.
293291
pub lightness: Option<f32>,
@@ -301,7 +299,6 @@ pub struct Lab {
301299

302300
/// Color specified by lightness, a- and b-axis components.
303301
#[derive(Clone, Copy, PartialEq, Debug)]
304-
#[repr(C)]
305302
pub struct Oklab {
306303
/// The lightness component.
307304
pub lightness: Option<f32>,
@@ -380,7 +377,6 @@ impl_lab_like!(Oklab, "oklab");
380377

381378
/// Color specified by lightness, chroma and hue components.
382379
#[derive(Clone, Copy, PartialEq, Debug)]
383-
#[repr(C)]
384380
pub struct Lch {
385381
/// The lightness component.
386382
pub lightness: Option<f32>,
@@ -394,7 +390,6 @@ pub struct Lch {
394390

395391
/// Color specified by lightness, chroma and hue components.
396392
#[derive(Clone, Copy, PartialEq, Debug)]
397-
#[repr(C)]
398393
pub struct Oklch {
399394
/// The lightness component.
400395
pub lightness: Option<f32>,

0 commit comments

Comments
 (0)