mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fixed some clippy warning by adding default implementations (#31989)
* Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
62a916ce5c
commit
df457c43c8
10 changed files with 28 additions and 71 deletions
|
@ -214,12 +214,6 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
impl NodeFlags {
|
||||
pub fn new() -> NodeFlags {
|
||||
NodeFlags::empty()
|
||||
}
|
||||
}
|
||||
|
||||
/// suppress observers flag
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-insert>
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-remove>
|
||||
|
@ -1816,15 +1810,12 @@ impl Node {
|
|||
}
|
||||
|
||||
pub fn new_inherited(doc: &Document) -> Node {
|
||||
Node::new_(NodeFlags::new(), Some(doc))
|
||||
Node::new_(NodeFlags::empty(), Some(doc))
|
||||
}
|
||||
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
pub fn new_document_node() -> Node {
|
||||
Node::new_(
|
||||
NodeFlags::new() | NodeFlags::IS_IN_DOC | NodeFlags::IS_CONNECTED,
|
||||
None,
|
||||
)
|
||||
Node::new_(NodeFlags::IS_IN_DOC | NodeFlags::IS_CONNECTED, None)
|
||||
}
|
||||
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue