diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-07-23 19:16:13 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-07-23 19:28:29 +0200 |
commit | 073629076f9268f8c8a4aa1e1ad1ca656ba18e89 (patch) | |
tree | abd1625b94a78275318b68fcf832ad19a14f06c1 /components/script/dom/mutationobserver.rs | |
parent | e4f978e2155dc31118be5562e135f004de5397f9 (diff) | |
download | servo-073629076f9268f8c8a4aa1e1ad1ca656ba18e89.tar.gz servo-073629076f9268f8c8a4aa1e1ad1ca656ba18e89.zip |
script: Avoid useless string clones in mutation observer stuff.
Diffstat (limited to 'components/script/dom/mutationobserver.rs')
-rw-r--r-- | components/script/dom/mutationobserver.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/mutationobserver.rs b/components/script/dom/mutationobserver.rs index d0dc201f12e..ff01ce96ba9 100644 --- a/components/script/dom/mutationobserver.rs +++ b/components/script/dom/mutationobserver.rs @@ -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) |