aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domtokenlist.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-11-03 16:28:14 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-11-03 16:28:14 +0530
commit1794e5875a1d1e61f00f7d0d0592fc5f7cd278d7 (patch)
treedd1efd197b7dba9b8683364a127997b74768520f /components/script/dom/domtokenlist.rs
parent9a800becdf7f6b3b3524d204485cb7c593b506f5 (diff)
parentd3d1f2b5c458e81c7596df0723dd75b28fe052f6 (diff)
downloadservo-1794e5875a1d1e61f00f7d0d0592fc5f7cd278d7.tar.gz
servo-1794e5875a1d1e61f00f7d0d0592fc5f7cd278d7.zip
Auto merge of #8295 - Ms2ger:cleanup, r=jdm
Various cleanup. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8295) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/domtokenlist.rs')
-rw-r--r--components/script/dom/domtokenlist.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs
index c3944b7627c..4c2a9769c15 100644
--- a/components/script/dom/domtokenlist.rs
+++ b/components/script/dom/domtokenlist.rs
@@ -64,10 +64,7 @@ impl DOMTokenListMethods for DOMTokenList {
// https://dom.spec.whatwg.org/#dom-domtokenlist-item
fn Item(&self, index: u32) -> Option<DOMString> {
self.attribute().and_then(|attr| {
- let attr = attr.r();
- Some(attr.value().as_tokens()).and_then(|tokens| {
- tokens.get(index as usize).map(|token| (**token).to_owned())
- })
+ attr.value().as_tokens().get(index as usize).map(|token| (**token).to_owned())
})
}