mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Replace 1-variant match_ignore_ascii_case! with expect_ident_matching
This commit is contained in:
parent
ba6d791ff5
commit
4fa3e8e82c
1 changed files with 1 additions and 7 deletions
|
@ -1344,13 +1344,7 @@ impl Parse for MinLength {
|
||||||
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
||||||
input.try(ExtremumLength::parse).map(MinLength::ExtremumLength)
|
input.try(ExtremumLength::parse).map(MinLength::ExtremumLength)
|
||||||
.or_else(|()| input.try(LengthOrPercentage::parse_non_negative).map(MinLength::LengthOrPercentage))
|
.or_else(|()| input.try(LengthOrPercentage::parse_non_negative).map(MinLength::LengthOrPercentage))
|
||||||
.or_else(|()| {
|
.or_else(|()| input.expect_ident_matching("auto").map(|()| MinLength::Auto))
|
||||||
match_ignore_ascii_case! { try!(input.expect_ident()),
|
|
||||||
"auto" =>
|
|
||||||
Ok(MinLength::Auto),
|
|
||||||
_ => Err(())
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue