Truly independent web browser
LibGfx: Remove paint enum decoders that nothing calls
Aliaksandr Kalenika6efbb971df3
diff --git a/Libraries/LibGfx/Rust/src/paint_enums.rs b/Libraries/LibGfx/Rust/src/paint_enums.rsindex 1a0ffa0cee1..85d4e2ca5c0 100644--- a/Libraries/LibGfx/Rust/src/paint_enums.rs+++ b/Libraries/LibGfx/Rust/src/paint_enums.rs@@ -41,12 +41,6 @@ pub enum ScalingMode {NearestNeighbor,}-impl ScalingMode {- pub fn from_raw(value: i32) -> Self {- Self::from_i32(value).unwrap_or_default()- }-}-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]#[repr(i32)]pub enum CompositingAndBlendingOperator {@@ -136,17 +130,6 @@ pub enum RectangularColorSpace {XyzD65,}-impl RectangularColorSpace {- pub fn from_u8(value: u8) -> Self {- if value <= Self::XyzD65 as u8 {- // SAFETY: the enum is a dense u8 range starting at zero.- unsafe { std::mem::transmute::<u8, Self>(value) }- } else {- Self::default()- }- }-}-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]#[repr(u8)]pub enum PolarColorSpace {@@ -157,17 +140,6 @@ pub enum PolarColorSpace {Oklch,}-impl PolarColorSpace {- pub fn from_u8(value: u8) -> Self {- if value <= Self::Oklch as u8 {- // SAFETY: the enum is a dense u8 range starting at zero.- unsafe { std::mem::transmute::<u8, Self>(value) }- } else {- Self::default()- }- }-}-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]#[repr(u8)]pub enum HueInterpolationMethod {@@ -178,17 +150,6 @@ pub enum HueInterpolationMethod {Decreasing,}-impl HueInterpolationMethod {- pub fn from_u8(value: u8) -> Self {- if value <= Self::Decreasing as u8 {- // SAFETY: the enum is a dense u8 range starting at zero.- unsafe { std::mem::transmute::<u8, Self>(value) }- } else {- Self::default()- }- }-}-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]#[repr(u8)]pub enum GradientInterpolationType {@@ -197,17 +158,6 @@ pub enum GradientInterpolationType {Polar,}-impl GradientInterpolationType {- pub fn from_u8(value: u8) -> Self {- if value <= Self::Polar as u8 {- // SAFETY: the enum is a dense u8 range starting at zero.- unsafe { std::mem::transmute::<u8, Self>(value) }- } else {- Self::default()- }- }-}-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]#[repr(C)]pub struct GradientInterpolationMethod {