mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Some trivial cleanup.
This commit is contained in:
parent
6eb0143541
commit
a491ccac83
3 changed files with 17 additions and 20 deletions
|
@ -171,11 +171,10 @@ impl hash::Hash for KeyframesName {
|
|||
impl Parse for KeyframesName {
|
||||
fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
let location = input.current_source_location();
|
||||
match input.next() {
|
||||
Ok(&Token::Ident(ref s)) => Ok(KeyframesName::Ident(CustomIdent::from_ident(location, s, &["none"])?)),
|
||||
Ok(&Token::QuotedString(ref s)) => Ok(KeyframesName::QuotedString(Atom::from(s.as_ref()))),
|
||||
Ok(t) => Err(location.new_unexpected_token_error(t.clone())),
|
||||
Err(e) => Err(e.into()),
|
||||
match *input.next()? {
|
||||
Token::Ident(ref s) => Ok(KeyframesName::Ident(CustomIdent::from_ident(location, s, &["none"])?)),
|
||||
Token::QuotedString(ref s) => Ok(KeyframesName::QuotedString(Atom::from(s.as_ref()))),
|
||||
ref t => Err(location.new_unexpected_token_error(t.clone())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue