aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/nodelist.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-12-17 10:42:52 +0100
committerJosh Matthews <josh@joshmatthews.net>2014-12-17 15:19:45 -0500
commit466faac2a507c833b282e274a28f6ae533c628f9 (patch)
tree0022a66d52deec0081b8b721b56e2f15d7225f8e /components/script/dom/nodelist.rs
parentb8900782b0fcb409f37189bdc08eb7f8b3564a5f (diff)
downloadservo-466faac2a507c833b282e274a28f6ae533c628f9.tar.gz
servo-466faac2a507c833b282e274a28f6ae533c628f9.zip
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
Diffstat (limited to 'components/script/dom/nodelist.rs')
-rw-r--r--components/script/dom/nodelist.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs
index d30f0ffc6b3..e2b09985146 100644
--- a/components/script/dom/nodelist.rs
+++ b/components/script/dom/nodelist.rs
@@ -38,19 +38,19 @@ impl NodeList {
}
pub fn new_simple_list(window: JSRef<Window>, elements: Vec<JSRef<Node>>) -> Temporary<NodeList> {
- NodeList::new(window, Simple(elements.iter().map(|element| JS::from_rooted(*element)).collect()))
+ NodeList::new(window, NodeListType::Simple(elements.iter().map(|element| JS::from_rooted(*element)).collect()))
}
pub fn new_child_list(window: JSRef<Window>, node: JSRef<Node>) -> Temporary<NodeList> {
- NodeList::new(window, Children(JS::from_rooted(node)))
+ NodeList::new(window, NodeListType::Children(JS::from_rooted(node)))
}
}
impl<'a> NodeListMethods for JSRef<'a, NodeList> {
fn Length(self) -> u32 {
match self.list_type {
- Simple(ref elems) => elems.len() as u32,
- Children(ref node) => {
+ NodeListType::Simple(ref elems) => elems.len() as u32,
+ NodeListType::Children(ref node) => {
let node = node.root();
node.children().count() as u32
}
@@ -60,8 +60,8 @@ impl<'a> NodeListMethods for JSRef<'a, NodeList> {
fn Item(self, index: u32) -> Option<Temporary<Node>> {
match self.list_type {
_ if index >= self.Length() => None,
- Simple(ref elems) => Some(Temporary::new(elems[index as uint].clone())),
- Children(ref node) => {
+ NodeListType::Simple(ref elems) => Some(Temporary::new(elems[index as uint].clone())),
+ NodeListType::Children(ref node) => {
let node = node.root();
node.children().nth(index as uint)
.map(|child| Temporary::from_rooted(child))