mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Trivially cleanup length parsing.
Mostly formatting signatures properly, but also removing useless functions and stuff.
This commit is contained in:
parent
a6113af873
commit
fdc8405330
3 changed files with 43 additions and 37 deletions
|
@ -113,6 +113,12 @@ impl<'a> ParserContext<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Whether we're in a @page rule.
|
||||
#[inline]
|
||||
pub fn in_page_rule(&self) -> bool {
|
||||
self.rule_type.map_or(false, |rule_type| rule_type == CssRuleType::Page)
|
||||
}
|
||||
|
||||
/// Get the rule type, which assumes that one is available.
|
||||
pub fn rule_type(&self) -> CssRuleType {
|
||||
self.rule_type.expect("Rule type expected, but none was found.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue