@@ -76,7 +76,7 @@ pub fn serialize_color_alpha(
7676
7777/// A Predefined color space specified in:
7878/// <https://drafts.csswg.org/css-color-4/#predefined>
79- #[ derive( Clone , Copy , PartialEq , Debug ) ]
79+ #[ derive( Clone , Copy , Eq , PartialEq , Debug ) ]
8080#[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
8181#[ cfg_attr( feature = "serde" , serde( tag = "type" ) ) ]
8282pub enum PredefinedColorSpace {
@@ -143,6 +143,7 @@ impl ToCss for PredefinedColorSpace {
143143}
144144
145145/// Parse a color hash, without the leading '#' character.
146+ #[ allow( clippy:: result_unit_err) ]
146147#[ inline]
147148pub fn parse_hash_color ( value : & [ u8 ] ) -> Result < ( u8 , u8 , u8 , f32 ) , ( ) > {
148149 Ok ( match value. len ( ) {
@@ -330,6 +331,7 @@ ascii_case_insensitive_phf_map! {
330331
331332/// Returns the named color with the given name.
332333/// <https://drafts.csswg.org/css-color-4/#typedef-named-color>
334+ #[ allow( clippy:: result_unit_err) ]
333335#[ inline]
334336pub fn parse_named_color ( ident : & str ) -> Result < ( u8 , u8 , u8 ) , ( ) > {
335337 named_colors:: get ( ident) . copied ( ) . ok_or ( ( ) )
0 commit comments