diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs index b9ccaffcab4..9ec3065af49 100644 --- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs +++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs @@ -100,7 +100,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject { fn BindVertexArrayOES(&self, vao: Option<&WebGLVertexArrayObjectOES>) { if let Some(bound_vao) = self.bound_vao.get() { // Store buffers attached to attrib pointers - bound_vao.vertex_attribs().set_from(&self.ctx.vertex_attribs()); + bound_vao.vertex_attribs().clone_from(&self.ctx.vertex_attribs()); for attrib_data in &*bound_vao.vertex_attribs().borrow() { if let Some(buffer) = attrib_data.buffer() { buffer.add_vao_reference(bound_vao.id()); @@ -125,7 +125,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject { self.bound_vao.set(Some(&vao)); // Restore WebGLRenderingContext current bindings - self.ctx.vertex_attribs().set_from(&vao.vertex_attribs()); + self.ctx.vertex_attribs().clone_from(&vao.vertex_attribs()); let element_array = vao.bound_buffer_element_array(); self.ctx.set_bound_buffer_element_array(element_array.as_ref().map(|buffer| &**buffer)); } else { diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 7a6b558144c..c415063deb0 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -3811,7 +3811,7 @@ impl VertexAttribs { } } - pub fn set_from(&self, other: &Self) { + pub fn clone_from(&self, other: &Self) { self.attribs.borrow_mut().clone_from_slice(&other.attribs.borrow()); }