Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various cleanup. #8295

Merged
merged 2 commits into from Nov 3, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Simplify DOMTokenList::Item.

  • Loading branch information
Ms2ger committed Nov 2, 2015
commit d3d1f2b5c458e81c7596df0723dd75b28fe052f6
@@ -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())
})
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.