Remove Option wrapper from RuleNode's StyleSource to save one word, add

a None variant to StyleSource as an indicator for a lack of style
source, and refactor all uses with this new form
This commit is contained in:
Brian Lewis 2017-06-14 11:10:34 +02:00
parent e41b7d06b4
commit 0fe381d774
5 changed files with 48 additions and 32 deletions

View file

@ -1068,7 +1068,8 @@ pub trait MatchMethods : TElement {
if log_enabled!(Trace) {
trace!("Matched rules:");
for rn in primary_rule_node.self_and_ancestors() {
if let Some(source) = rn.style_source() {
let source = rn.style_source();
if source.is_some() {
trace!(" > {:?}", source);
}
}