mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
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 -->
This commit is contained in:
commit
1794e5875a
2 changed files with 5 additions and 8 deletions
|
@ -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())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue