@@ -76,7 +76,7 @@ pub fn serialize_color_alpha(
76
76
77
77
/// A Predefined color space specified in:
78
78
/// <https://drafts.csswg.org/css-color-4/#predefined>
79
- #[ derive( Clone , Copy , PartialEq , Debug ) ]
79
+ #[ derive( Clone , Copy , Eq , PartialEq , Debug ) ]
80
80
#[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
81
81
#[ cfg_attr( feature = "serde" , serde( tag = "type" ) ) ]
82
82
pub enum PredefinedColorSpace {
@@ -143,6 +143,7 @@ impl ToCss for PredefinedColorSpace {
143
143
}
144
144
145
145
/// Parse a color hash, without the leading '#' character.
146
+ #[ allow( clippy:: result_unit_err) ]
146
147
#[ inline]
147
148
pub fn parse_hash_color ( value : & [ u8 ] ) -> Result < ( u8 , u8 , u8 , f32 ) , ( ) > {
148
149
Ok ( match value. len ( ) {
@@ -330,6 +331,7 @@ ascii_case_insensitive_phf_map! {
330
331
331
332
/// Returns the named color with the given name.
332
333
/// <https://drafts.csswg.org/css-color-4/#typedef-named-color>
334
+ #[ allow( clippy:: result_unit_err) ]
333
335
#[ inline]
334
336
pub fn parse_named_color ( ident : & str ) -> Result < ( u8 , u8 , u8 ) , ( ) > {
335
337
named_colors:: get ( ident) . copied ( ) . ok_or ( ( ) )
0 commit comments