diff --git a/palette/src/rgb/rgb.rs b/palette/src/rgb/rgb.rs index 2261aab51..d60e42225 100644 --- a/palette/src/rgb/rgb.rs +++ b/palette/src/rgb/rgb.rs @@ -948,12 +948,10 @@ impl From for FromHexError { impl From<&'static str> for FromHexError { fn from(err: &'static str) -> FromHexError { - match err { - err if err.contains("rgba") => FromHexError::RgbaHexFormatError(err), - _ => FromHexError::HexFormatError(err), - } + FromHexError::HexFormatError(err) } } + impl core::fmt::Display for FromHexError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match &*self {