mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix more clippy warnings in components/scripts/dom
(#31914)
* refrence to a reference * refrence to a reference
This commit is contained in:
parent
5aae820f6d
commit
3ddb47e902
5 changed files with 11 additions and 11 deletions
|
@ -86,7 +86,7 @@ pub trait VirtualMethods {
|
|||
/// on this element.
|
||||
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match self.super_type() {
|
||||
Some(ref s) => s.parse_plain_attribute(name, value),
|
||||
Some(s) => s.parse_plain_attribute(name, value),
|
||||
_ => AttrValue::String(value.into()),
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ pub trait VirtualMethods {
|
|||
/// Called when a Node is appended to a tree, where 'tree_connected' indicates
|
||||
/// whether the tree is part of a Document.
|
||||
fn bind_to_tree(&self, context: &BindContext) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.bind_to_tree(context);
|
||||
}
|
||||
}
|
||||
|
@ -104,14 +104,14 @@ pub trait VirtualMethods {
|
|||
/// Implements removing steps:
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-remove-ext>
|
||||
fn unbind_from_tree(&self, context: &UnbindContext) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.unbind_from_tree(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// Called on the parent when its children are changed.
|
||||
fn children_changed(&self, mutation: &ChildrenMutation) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.children_changed(mutation);
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ pub trait VirtualMethods {
|
|||
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-adopt-ext>
|
||||
fn adopting_steps(&self, old_doc: &Document) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.adopting_steps(old_doc);
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ pub trait VirtualMethods {
|
|||
maybe_doc: Option<&Document>,
|
||||
clone_children: CloneChildrenFlag,
|
||||
) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.cloning_steps(copy, maybe_doc, clone_children);
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ pub trait VirtualMethods {
|
|||
/// Called on an element when it is popped off the stack of open elements
|
||||
/// of a parser.
|
||||
fn pop(&self) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
if let Some(s) = self.super_type() {
|
||||
s.pop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue