diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-12-14 08:31:30 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-12-28 13:17:47 +0100 |
commit | be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8 (patch) | |
tree | db8be2dfee5cff6ef0c42e8d46c623eb87529e5a /components/script/dom/element.rs | |
parent | 82fc6d9f49a657e2857da3f1b22140e3b6efdf09 (diff) | |
download | servo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.tar.gz servo-be69f9c3e6a6f5efb5ba1edd50955cb12c111bf8.zip |
Rustfmt has changed its default style :/
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 54c1b553beb..34ab0b4ffdb 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -1532,11 +1532,9 @@ impl Element { pub fn get_int_attribute(&self, local_name: &LocalName, default: i32) -> i32 { // TODO: Is this assert necessary? - assert!( - local_name - .chars() - .all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch) - ); + assert!(local_name + .chars() + .all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch)); let attribute = self.get_attribute(&ns!(), local_name); match attribute { @@ -1557,11 +1555,9 @@ impl Element { } pub fn get_uint_attribute(&self, local_name: &LocalName, default: u32) -> u32 { - assert!( - local_name - .chars() - .all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch) - ); + assert!(local_name + .chars() + .all(|ch| !ch.is_ascii() || ch.to_ascii_lowercase() == ch)); let attribute = self.get_attribute(&ns!(), local_name); match attribute { Some(ref attribute) => match *attribute.value() { @@ -2840,10 +2836,11 @@ impl<'a> SelectorsElement for DomRoot<Element> { fn is_empty(&self) -> bool { self.node.children().all(|node| { - !node.is::<Element>() && match node.downcast::<Text>() { - None => true, - Some(text) => text.upcast::<CharacterData>().data().is_empty(), - } + !node.is::<Element>() && + match node.downcast::<Text>() { + None => true, + Some(text) => text.upcast::<CharacterData>().data().is_empty(), + } }) } |