From 45a2fa8f8a81ca94a7ff23886d128878631e31ca Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Thu, 30 Mar 2017 14:20:12 +0200 Subject: [PATCH] Favor Rc::clone function syntax instead of method syntax in device.rs. --- webrender/src/device.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/webrender/src/device.rs b/webrender/src/device.rs index fc9c1df50b..b895fd5909 100644 --- a/webrender/src/device.rs +++ b/webrender/src/device.rs @@ -676,10 +676,10 @@ impl GpuProfiler { GpuProfiler { next_frame: 0, frames: [ - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), ], } } @@ -721,12 +721,12 @@ impl GpuMarker { gl::GlType::Gl => { gl.push_group_marker_ext(message); GpuMarker{ - gl: gl.clone(), + gl: Rc::clone(&gl), } } gl::GlType::Gles => { GpuMarker{ - gl: gl.clone(), + gl: Rc::clone(&gl), } } } @@ -1108,7 +1108,7 @@ impl Device { }; let texture = Texture { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), id: id, width: 0, height: 0, @@ -1451,7 +1451,7 @@ impl Device { } let program = Program { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), name: base_filename.to_owned(), id: pid, u_transform: -1, @@ -1795,7 +1795,7 @@ impl Device { ibo_id.bind(self.gl()); // force it to be a part of VAO let vao = VAO { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), id: vao_id, ibo_id: ibo_id, main_vbo_id: main_vbo_id,