aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorRosemary Ajayi <okhuomonajayi54@gmail.com>2024-03-19 22:22:37 +0000
committerGitHub <noreply@github.com>2024-03-19 22:22:37 +0000
commit865f6e621fde4e6d5b7cf165f2562e9ea18fab23 (patch)
treef394119cdf1d23fa0f795484997f6a6d28a840fd /components/script/dom/node.rs
parent96e5e776d26d2b8657d805647521b37af9d13b13 (diff)
downloadservo-865f6e621fde4e6d5b7cf165f2562e9ea18fab23.tar.gz
servo-865f6e621fde4e6d5b7cf165f2562e9ea18fab23.zip
clippy: Fix clippy Problems in components/scripts (#31759)
* revert cargo * revert cargo * fic clippy problems
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 248c20c76e3..84977807d16 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -2089,13 +2089,13 @@ impl Node {
);
} else {
// Step 7.7.2.2.
- try_upgrade_element(&*descendant);
+ try_upgrade_element(&descendant);
}
}
}
}
if let SuppressObserver::Unsuppressed = suppress_observers {
- vtable_for(&parent).children_changed(&ChildrenMutation::insert(
+ vtable_for(parent).children_changed(&ChildrenMutation::insert(
previous_sibling.as_deref(),
new_nodes,
child,
@@ -2107,7 +2107,7 @@ impl Node {
prev: previous_sibling.as_deref(),
next: child,
};
- MutationObserver::queue_a_mutation_record(&parent, mutation);
+ MutationObserver::queue_a_mutation_record(parent, mutation);
}
node.owner_doc().remove_script_and_layout_blocker();
}
@@ -2117,7 +2117,7 @@ impl Node {
parent.owner_doc().add_script_and_layout_blocker();
// Step 1.
if let Some(node) = node {
- Node::adopt(node, &*parent.owner_doc());
+ Node::adopt(node, &parent.owner_doc());
}
// Step 2.
rooted_vec!(let removed_nodes <- parent.children());
@@ -2142,7 +2142,7 @@ impl Node {
Node::insert(node, parent, None, SuppressObserver::Suppressed);
}
// Step 6.
- vtable_for(&parent).children_changed(&ChildrenMutation::replace_all(
+ vtable_for(parent).children_changed(&ChildrenMutation::replace_all(
removed_nodes.r(),
added_nodes,
));
@@ -2154,7 +2154,7 @@ impl Node {
prev: None,
next: None,
};
- MutationObserver::queue_a_mutation_record(&parent, mutation);
+ MutationObserver::queue_a_mutation_record(parent, mutation);
}
parent.owner_doc().remove_script_and_layout_blocker();
}
@@ -2216,9 +2216,9 @@ impl Node {
// Step 11. transient registered observers
// Step 12.
if let SuppressObserver::Unsuppressed = suppress_observers {
- vtable_for(&parent).children_changed(&ChildrenMutation::replace(
+ vtable_for(parent).children_changed(&ChildrenMutation::replace(
old_previous_sibling.as_deref(),
- &Some(&node),
+ &Some(node),
&[],
old_next_sibling.as_deref(),
));
@@ -2230,7 +2230,7 @@ impl Node {
prev: old_previous_sibling.as_deref(),
next: old_next_sibling.as_deref(),
};
- MutationObserver::queue_a_mutation_record(&parent, mutation);
+ MutationObserver::queue_a_mutation_record(parent, mutation);
}
parent.owner_doc().remove_script_and_layout_blocker();
}
@@ -2360,7 +2360,7 @@ impl Node {
}
// Step 5: cloning steps.
- vtable_for(&node).cloning_steps(&copy, maybe_doc, clone_children);
+ vtable_for(node).cloning_steps(&copy, maybe_doc, clone_children);
// Step 6.
if clone_children == CloneChildrenFlag::CloneChildren {
@@ -2387,7 +2387,7 @@ impl Node {
pub fn collect_text_contents<T: Iterator<Item = DomRoot<Node>>>(iterator: T) -> DOMString {
let mut content = String::new();
for node in iterator {
- if let Some(ref text) = node.downcast::<Text>() {
+ if let Some(text) = node.downcast::<Text>() {
content.push_str(&text.upcast::<CharacterData>().data());
}
}
@@ -2477,7 +2477,7 @@ impl NodeMethods for Node {
// https://dom.spec.whatwg.org/#dom-node-isconnected
fn IsConnected(&self) -> bool {
- return self.is_connected();
+ self.is_connected()
}
// https://dom.spec.whatwg.org/#dom-node-ownerdocument
@@ -2758,7 +2758,7 @@ impl NodeMethods for Node {
Node::insert(node, self, reference_child, SuppressObserver::Suppressed);
// Step 14.
- vtable_for(&self).children_changed(&ChildrenMutation::replace(
+ vtable_for(self).children_changed(&ChildrenMutation::replace(
previous_sibling.as_deref(),
&removed_child,
nodes,