mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Minor cleanup: Use shorthand initialization in selectors.
Differential Revision: https://phabricator.services.mozilla.com/D90049
This commit is contained in:
parent
639bada63a
commit
89c2e39dd9
2 changed files with 15 additions and 15 deletions
|
@ -661,7 +661,7 @@ impl<Impl: SelectorImpl> Selector<Impl> {
|
|||
pub fn iter_from(&self, offset: usize) -> SelectorIter<Impl> {
|
||||
let iter = self.0.slice[offset..].iter();
|
||||
SelectorIter {
|
||||
iter: iter,
|
||||
iter,
|
||||
next_combinator: None,
|
||||
}
|
||||
}
|
||||
|
@ -1961,16 +1961,16 @@ where
|
|||
return Ok(Component::AttributeOther(Box::new(
|
||||
AttrSelectorWithOptionalNamespace {
|
||||
namespace: Some(namespace),
|
||||
local_name: local_name,
|
||||
local_name_lower: local_name_lower,
|
||||
local_name,
|
||||
local_name_lower,
|
||||
operation: ParsedAttrSelectorOperation::Exists,
|
||||
never_matches: false,
|
||||
},
|
||||
)));
|
||||
} else {
|
||||
return Ok(Component::AttributeInNoNamespaceExists {
|
||||
local_name: local_name,
|
||||
local_name_lower: local_name_lower,
|
||||
local_name,
|
||||
local_name_lower,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -2034,19 +2034,19 @@ where
|
|||
local_name_lower,
|
||||
never_matches,
|
||||
operation: ParsedAttrSelectorOperation::WithValue {
|
||||
operator: operator,
|
||||
case_sensitivity: case_sensitivity,
|
||||
operator,
|
||||
case_sensitivity,
|
||||
expected_value: value,
|
||||
},
|
||||
},
|
||||
)))
|
||||
} else {
|
||||
Ok(Component::AttributeInNoNamespace {
|
||||
local_name: local_name,
|
||||
operator: operator,
|
||||
value: value,
|
||||
case_sensitivity: case_sensitivity,
|
||||
never_matches: never_matches,
|
||||
local_name,
|
||||
operator,
|
||||
value,
|
||||
case_sensitivity,
|
||||
never_matches,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue