File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ impl<'self> SkipWhitespaceIterable<'self> for &'self [ComponentValue] {
138
138
}
139
139
}
140
140
141
+ #[ deriving( Clone ) ]
141
142
pub struct SkipWhitespaceIterator < ' self > {
142
143
iter_with_whitespace : vec:: VecIterator < ' self , ComponentValue > ,
143
144
}
Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ pub enum Color {
22
22
23
23
24
24
// Return None on invalid/unsupported value (not a color)
25
- pub fn parse_color ( component_value : & ComponentValue ) -> Option < Color > {
26
- match * component_value {
27
- Hash ( ref value) | IDHash ( ref value) => parse_color_hash ( * value) ,
28
- Ident ( ref value) => parse_color_keyword ( * value) ,
29
- Function ( ref name, ref arguments) => parse_color_function ( * name, * arguments) ,
30
- _ => None
25
+ impl Color {
26
+ pub fn parse ( component_value : & ComponentValue ) -> Option < Color > {
27
+ match * component_value {
28
+ Hash ( ref value) | IDHash ( ref value) => parse_color_hash ( * value) ,
29
+ Ident ( ref value) => parse_color_keyword ( * value) ,
30
+ Function ( ref name, ref arguments) => parse_color_function ( * name, * arguments) ,
31
+ _ => None
32
+ }
31
33
}
32
34
}
33
35
You can’t perform that action at this time.
0 commit comments