mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use push instead of referring to the last element.
This commit is contained in:
parent
cae74b4f86
commit
ae1f16887d
1 changed files with 2 additions and 2 deletions
|
@ -303,11 +303,11 @@ impl Stylist {
|
||||||
// optimizations regarding grouping of Rules having the same Selector.
|
// optimizations regarding grouping of Rules having the same Selector.
|
||||||
let mut declarations_list = ~[];
|
let mut declarations_list = ~[];
|
||||||
for rules in matching_rules_list.iter() {
|
for rules in matching_rules_list.iter() {
|
||||||
declarations_list.push(~[]);
|
let mut curr_declarations = ~[];
|
||||||
let curr_declarations = &mut declarations_list[declarations_list.len() - 1];
|
|
||||||
for rule in rules.iter() {
|
for rule in rules.iter() {
|
||||||
curr_declarations.push(rule.declarations.clone());
|
curr_declarations.push(rule.declarations.clone());
|
||||||
}
|
}
|
||||||
|
declarations_list.push(curr_declarations);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut applicable_declarations = ~[];
|
let mut applicable_declarations = ~[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue