Update cssparser to 0.18

https://github.com/servo/rust-cssparser/pull/171
This commit is contained in:
Simon Sapin 2017-07-20 21:03:53 +02:00
parent 30d6d6024b
commit eb98ae6e04
64 changed files with 541 additions and 512 deletions

View file

@ -117,17 +117,17 @@
impl Parse for Side {
fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Side, ParseError<'i>> {
match input.next()? {
Token::Ident(ident) => {
match *input.next()? {
Token::Ident(ref ident) => {
try_match_ident_ignore_ascii_case! { ident,
"clip" => Ok(Side::Clip),
"ellipsis" => Ok(Side::Ellipsis),
}
}
Token::QuotedString(v) => {
Ok(Side::String(v.into_owned().into_boxed_str()))
Token::QuotedString(ref v) => {
Ok(Side::String(v.as_ref().to_owned().into_boxed_str()))
}
other => Err(BasicParseError::UnexpectedToken(other).into()),
ref t => Err(BasicParseError::UnexpectedToken(t.clone()).into()),
}
}
}
@ -236,7 +236,7 @@ ${helpers.single_keyword("unicode-bidi",
"blink" => if result.contains(BLINK) { Err(()) }
else { empty = false; result.insert(BLINK); Ok(()) },
_ => Err(())
}).map_err(|()| SelectorParseError::UnexpectedIdent(ident).into())
}).map_err(|()| SelectorParseError::UnexpectedIdent(ident.clone()).into())
}
Err(e) => return Err(e.into())
}