style: Some trivial cleanup.

This commit is contained in:
Emilio Cobos Álvarez 2017-12-24 19:21:10 +01:00
parent 6eb0143541
commit a491ccac83
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 17 additions and 20 deletions

View file

@ -101,11 +101,11 @@ macro_rules! parse_quoted_or_unquoted_string {
let start = input.position();
input.parse_entirely(|input| {
let location = input.current_source_location();
match input.next() {
Ok(&Token::QuotedString(ref value)) =>
Ok($url_matching_function(value.as_ref().to_owned())),
Ok(t) => Err(location.new_unexpected_token_error(t.clone())),
Err(e) => Err(e.into()),
match *input.next()? {
Token::QuotedString(ref value) => {
Ok($url_matching_function(value.as_ref().to_owned()))
},
ref t => Err(location.new_unexpected_token_error(t.clone())),
}
}).or_else(|_: ParseError| {
while let Ok(_) = input.next() {}