Rustfmt has changed its default style :/

This commit is contained in:
Simon Sapin 2018-12-14 08:31:30 +01:00
parent 82fc6d9f49
commit be69f9c3e6
207 changed files with 1200 additions and 1339 deletions

View file

@ -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(),
}
})
}