We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a944f54 commit 850eac1Copy full SHA for 850eac1
src/color.rs
@@ -141,6 +141,7 @@ impl Color {
141
///
142
/// FIXME(#2) Deprecated CSS2 System Colors are not supported yet.
143
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Color, BasicParseError<'i>> {
144
+ // FIXME: remove clone() when lifetimes are non-lexical
145
let token = input.next()?.clone();
146
match token {
147
Token::Hash(ref value) | Token::IDHash(ref value) => {
@@ -154,7 +155,7 @@ impl Color {
154
155
}).map_err(ParseError::<()>::basic);
156
}
157
_ => Err(())
- }.map_err(|()| BasicParseError::UnexpectedToken(token.clone()))
158
+ }.map_err(|()| BasicParseError::UnexpectedToken(token))
159
160
161
/// Parse a color hash, without the leading '#' character.
0 commit comments