mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
script: Avoid useless string clones in mutation observer stuff.
This commit is contained in:
parent
e4f978e215
commit
073629076f
1 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ impl MutationObserver {
|
|||
}
|
||||
|
||||
// Step 4
|
||||
for &(ref observer, ref paired_string) in &interested_observers {
|
||||
for (observer, paired_string) in interested_observers {
|
||||
// Steps 4.1-4.7
|
||||
let record = match attr_type {
|
||||
Mutation::Attribute { ref name, ref namespace, .. } => {
|
||||
|
@ -193,10 +193,10 @@ impl MutationObserver {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
MutationRecord::attribute_mutated(target, name, namespace, paired_string.clone())
|
||||
MutationRecord::attribute_mutated(target, name, namespace, paired_string)
|
||||
},
|
||||
Mutation::CharacterData { .. } => {
|
||||
MutationRecord::character_data_mutated(target, paired_string.clone())
|
||||
MutationRecord::character_data_mutated(target, paired_string)
|
||||
}
|
||||
Mutation::ChildList { ref added, ref removed, ref next, ref prev } => {
|
||||
MutationRecord::child_list_mutated(target, *added, *removed, *next, *prev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue