mirror of
https://github.com/servo/servo.git
synced 2025-07-17 12:23:40 +01:00
style: Use the OrderedMap iterator instead of doing our own thing.
This commit is contained in:
parent
f072c0bb05
commit
583d89ac08
1 changed files with 2 additions and 5 deletions
|
@ -470,8 +470,7 @@ pub fn cascade<'a>(
|
||||||
None => {
|
None => {
|
||||||
let mut map = OrderedMap::new();
|
let mut map = OrderedMap::new();
|
||||||
if let Some(inherited) = inherited {
|
if let Some(inherited) = inherited {
|
||||||
for name in &inherited.index {
|
for (name, inherited_value) in inherited.iter() {
|
||||||
let inherited_value = inherited.get(name).unwrap();
|
|
||||||
map.insert(name, BorrowedSpecifiedValue {
|
map.insert(name, BorrowedSpecifiedValue {
|
||||||
css: &inherited_value.css,
|
css: &inherited_value.css,
|
||||||
first_token_type: inherited_value.first_token_type,
|
first_token_type: inherited_value.first_token_type,
|
||||||
|
@ -575,9 +574,7 @@ fn substitute_all(
|
||||||
) -> CustomPropertiesMap {
|
) -> CustomPropertiesMap {
|
||||||
let mut custom_properties_map = CustomPropertiesMap::new();
|
let mut custom_properties_map = CustomPropertiesMap::new();
|
||||||
let mut invalid = PrecomputedHashSet::default();
|
let mut invalid = PrecomputedHashSet::default();
|
||||||
for name in &specified_values_map.index {
|
for (name, value) in specified_values_map.iter() {
|
||||||
let value = specified_values_map.get(name).unwrap();
|
|
||||||
|
|
||||||
// If this value is invalid at computed-time it won’t be inserted in computed_values_map.
|
// If this value is invalid at computed-time it won’t be inserted in computed_values_map.
|
||||||
// Nothing else to do.
|
// Nothing else to do.
|
||||||
let _ = substitute_one(
|
let _ = substitute_one(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue