Replace uint/int by usize/isize in various places.

This commit is contained in:
Ms2ger 2015-02-20 14:43:29 +01:00
parent 9c863a6bd4
commit 6d30ec77c8
14 changed files with 36 additions and 34 deletions

View file

@ -189,16 +189,17 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> {
// http://dom.spec.whatwg.org/#dom-htmlcollection-item
fn Item(self, index: u32) -> Option<Temporary<Element>> {
let index = index as usize;
match self.collection {
CollectionTypeId::Static(ref elems) => elems
.as_slice()
.get(index as uint)
.get(index)
.map(|elem| Temporary::new(elem.clone())),
CollectionTypeId::Live(ref root, ref filter) => {
let root = root.root();
HTMLCollection::traverse(root.r())
.filter(|element| filter.filter(*element, root.r()))
.nth(index as uint)
.nth(index)
.clone()
.map(Temporary::from_rooted)
}