Replace 1-variant match_ignore_ascii_case! with expect_ident_matching

This commit is contained in:
Simon Sapin 2017-02-26 10:39:10 +01:00
parent ba6d791ff5
commit 4fa3e8e82c

View file

@ -1344,13 +1344,7 @@ impl Parse for MinLength {
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
input.try(ExtremumLength::parse).map(MinLength::ExtremumLength)
.or_else(|()| input.try(LengthOrPercentage::parse_non_negative).map(MinLength::LengthOrPercentage))
.or_else(|()| {
match_ignore_ascii_case! { try!(input.expect_ident()),
"auto" =>
Ok(MinLength::Auto),
_ => Err(())
}
})
.or_else(|()| input.expect_ident_matching("auto").map(|()| MinLength::Auto))
}
}