aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domtokenlist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domtokenlist.rs')
-rw-r--r--components/script/dom/domtokenlist.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs
index 28c71f0838f..23bfb7ed300 100644
--- a/components/script/dom/domtokenlist.rs
+++ b/components/script/dom/domtokenlist.rs
@@ -45,7 +45,7 @@ impl DOMTokenList {
match token {
"" => Err(Error::Syntax),
slice if slice.find(HTML_SPACE_CHARACTERS).is_some() => Err(Error::InvalidCharacter),
- slice => Ok(Atom::from_slice(slice))
+ slice => Ok(Atom::from_slice(slice)),
}
}
}
@@ -99,9 +99,7 @@ impl DOMTokenListMethods for DOMTokenList {
let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
for token in &tokens {
let token = try!(self.check_token_exceptions(&token));
- atoms.iter().position(|atom| *atom == token).map(|index| {
- atoms.remove(index)
- });
+ atoms.iter().position(|atom| *atom == token).map(|index| atoms.remove(index));
}
self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
Ok(())
@@ -127,7 +125,7 @@ impl DOMTokenListMethods for DOMTokenList {
self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
Ok(true)
}
- }
+ },
}
}