@@ -9,7 +9,7 @@ use std::f32::consts::PI;
9
9
use std:: fmt;
10
10
use std:: str:: FromStr ;
11
11
12
- use super :: { ParseError , Parser , ToCss , Token } ;
12
+ use super :: { CowRcStr , ParseError , Parser , ToCss , Token } ;
13
13
14
14
#[ cfg( feature = "serde" ) ]
15
15
use serde:: { Deserialize , Deserializer , Serialize , Serializer } ;
@@ -902,7 +902,7 @@ where
902
902
Token :: Function ( ref name) => {
903
903
let name = name. clone ( ) ;
904
904
return input. parse_nested_block ( |arguments| {
905
- parse_color_function ( color_parser, & name, arguments)
905
+ parse_color_function ( color_parser, name, arguments)
906
906
} ) ;
907
907
}
908
908
_ => Err ( ( ) ) ,
@@ -1210,13 +1210,13 @@ where
1210
1210
#[ inline]
1211
1211
fn parse_color_function < ' i , ' t , P > (
1212
1212
color_parser : & P ,
1213
- name : & str ,
1213
+ name : CowRcStr < ' i > ,
1214
1214
arguments : & mut Parser < ' i , ' t > ,
1215
1215
) -> Result < P :: Output , ParseError < ' i , P :: Error > >
1216
1216
where
1217
1217
P : ColorParser < ' i > ,
1218
1218
{
1219
- let color = match_ignore_ascii_case ! { name,
1219
+ let color = match_ignore_ascii_case ! { & name,
1220
1220
"rgb" | "rgba" => parse_rgb( color_parser, arguments) ,
1221
1221
1222
1222
"hsl" | "hsla" => parse_hsl( color_parser, arguments) ,
@@ -1241,7 +1241,7 @@ where
1241
1241
1242
1242
"color" => parse_color_with_color_space( color_parser, arguments) ,
1243
1243
1244
- _ => return Err ( arguments. new_unexpected_token_error( Token :: Ident ( name. to_owned ( ) . into ( ) ) ) ) ,
1244
+ _ => return Err ( arguments. new_unexpected_token_error( Token :: Ident ( name) ) ) ,
1245
1245
} ?;
1246
1246
1247
1247
arguments. expect_exhausted ( ) ?;
0 commit comments