aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-12-14 08:31:30 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-12-28 13:17:47 +0100
commitbe69f9c3e6a6f5efb5ba1edd50955cb12c111bf8 (patch)
treedb8be2dfee5cff6ef0c42e8d46c623eb87529e5a /components/script/dom/node.rs
parent82fc6d9f49a657e2857da3f1b22140e3b6efdf09 (diff)
downloadservo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.tar.gz
servo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.zip
Rustfmt has changed its default style :/
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs21
1 files changed, 10 insertions, 11 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index ff6374a8b99..77b7d66cf2d 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -4,7 +4,6 @@
//! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements.
-use app_units::Au;
use crate::document_loader::DocumentLoader;
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
@@ -55,6 +54,7 @@ use crate::dom::text::Text;
use crate::dom::virtualmethods::{vtable_for, VirtualMethods};
use crate::dom::window::Window;
use crate::script_thread::ScriptThread;
+use app_units::Au;
use devtools_traits::NodeInfo;
use dom_struct::dom_struct;
use euclid::{Point2D, Rect, Size2D, Vector2D};
@@ -1850,10 +1850,9 @@ impl Node {
// https://dom.spec.whatwg.org/#concept-node-remove
fn remove(node: &Node, parent: &Node, suppress_observers: SuppressObserver) {
parent.owner_doc().add_script_and_layout_blocker();
- assert!(
- node.GetParentNode()
- .map_or(false, |node_parent| &*node_parent == parent)
- );
+ assert!(node
+ .GetParentNode()
+ .map_or(false, |node_parent| &*node_parent == parent));
let cached_index = {
if parent.ranges.is_empty() {
None
@@ -2242,10 +2241,10 @@ impl NodeMethods for Node {
// Step 4-5.
match node.type_id() {
NodeTypeId::CharacterData(CharacterDataTypeId::Text) if self.is::<Document>() => {
- return Err(Error::HierarchyRequest)
+ return Err(Error::HierarchyRequest);
},
NodeTypeId::DocumentType if !self.is::<Document>() => {
- return Err(Error::HierarchyRequest)
+ return Err(Error::HierarchyRequest);
},
NodeTypeId::Document(_) => return Err(Error::HierarchyRequest),
_ => (),
@@ -2462,14 +2461,14 @@ impl NodeMethods for Node {
NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction)
if !is_equal_processinginstruction(this, node) =>
{
- return false
- },
+ return false;
+ }
NodeTypeId::CharacterData(CharacterDataTypeId::Text) |
NodeTypeId::CharacterData(CharacterDataTypeId::Comment)
if !is_equal_characterdata(this, node) =>
{
- return false
- },
+ return false;
+ }
// Step 4.
NodeTypeId::Element(..) if !is_equal_element_attrs(this, node) => return false,
_ => (),