Skip to content

Commit

Permalink
style: Avoid dumb AllowedNumericType::All::is_ok.
Browse files Browse the repository at this point in the history
It always returns true, so this is just stupid.
  • Loading branch information
emilio committed Mar 26, 2017
1 parent c2d9f66 commit 1e45c50
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/style/values/specified/length.rs
Expand Up @@ -912,10 +912,8 @@ impl ToCss for Percentage {
impl Parse for Percentage {
#[inline]
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
let context = AllowedNumericType::All;
match try!(input.next()) {
Token::Percentage(ref value) if context.is_ok(value.unit_value) =>
Ok(Percentage(value.unit_value)),
Token::Percentage(ref value) => Ok(Percentage(value.unit_value)),
_ => Err(())
}
}
Expand Down

0 comments on commit 1e45c50

Please sign in to comment.