Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Color struct no longer need to be repr(C)
  • Loading branch information
tiaanl committed Mar 11, 2023
commit 79d0cf59b3e4dadb45ef7e9ed88201d7c0294f83
5 changes: 0 additions & 5 deletions src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ fn normalize_hue(hue: f32) -> f32 {

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

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

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

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

/// Color specified by lightness, chroma and hue components.
#[derive(Clone, Copy, PartialEq, Debug)]
#[repr(C)]
pub struct Oklch {
/// The lightness component.
pub lightness: Option<f32>,
Expand Down