diff --git a/src/components/script/dom/clientrectlist.rs b/src/components/script/dom/clientrectlist.rs index 9095819edbf..a3bc7010af7 100644 --- a/src/components/script/dom/clientrectlist.rs +++ b/src/components/script/dom/clientrectlist.rs @@ -11,13 +11,13 @@ use dom::window::Window; #[deriving(Encodable)] pub struct ClientRectList { pub reflector_: Reflector, - pub rects: ~[JS], + pub rects: Vec>, pub window: JS, } impl ClientRectList { pub fn new_inherited(window: JS, - rects: ~[JS]) -> ClientRectList { + rects: Vec>) -> ClientRectList { ClientRectList { reflector_: Reflector::new(), rects: rects, @@ -26,7 +26,7 @@ impl ClientRectList { } pub fn new(window: &JS, - rects: ~[JS]) -> JS { + rects: Vec>) -> JS { reflect_dom_object(~ClientRectList::new_inherited(window.clone(), rects), window, ClientRectListBinding::Wrap) } @@ -37,7 +37,7 @@ impl ClientRectList { pub fn Item(&self, index: u32) -> Option> { if index < self.rects.len() as u32 { - Some(self.rects[index as uint].clone()) + Some(self.rects.get(index as uint).clone()) } else { None }