diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-04-26 11:04:06 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-04-28 23:06:25 +0200 |
commit | cc23a324e5eb4c7a7182c7c8bbe3126bec7977b8 (patch) | |
tree | f4031faaace4c22ce049d1e88f45155539933d63 /src/components/script/dom/htmlcollection.rs | |
parent | 251e22266e1bccb2a12ece85e42c76db9dd11b61 (diff) | |
download | servo-cc23a324e5eb4c7a7182c7c8bbe3126bec7977b8.tar.gz servo-cc23a324e5eb4c7a7182c7c8bbe3126bec7977b8.zip |
Make static HTMLCollections use Vec.
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r-- | src/components/script/dom/htmlcollection.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/script/dom/htmlcollection.rs b/src/components/script/dom/htmlcollection.rs index 70a94b04f43..5d5f7de0ae0 100644 --- a/src/components/script/dom/htmlcollection.rs +++ b/src/components/script/dom/htmlcollection.rs @@ -26,7 +26,7 @@ impl<S: Encoder<E>, E> Encodable<S, E> for ~CollectionFilter { #[deriving(Encodable)] pub enum CollectionTypeId { - Static(~[JS<Element>]), + Static(Vec<JS<Element>>), Live(JS<Node>, ~CollectionFilter) } @@ -135,6 +135,7 @@ impl HTMLCollection { pub fn Item(&self, index: u32) -> Option<JS<Element>> { match self.collection { Static(ref elems) => elems + .as_slice() .get(index as uint) .map(|elem| elem.clone()), Live(ref root, ref filter) => root.traverse_preorder() |