From 70ff8c3faa287ea44b00195654406cec4b3b961e Mon Sep 17 00:00:00 2001 From: scott-c Date: Sat, 8 Aug 2020 19:18:59 +0800 Subject: [PATCH] Add Copy trait to dependents --- voxygen/src/scene/camera.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/scene/camera.rs b/voxygen/src/scene/camera.rs index 65aaa7bbe2..b074f73ef5 100644 --- a/voxygen/src/scene/camera.rs +++ b/voxygen/src/scene/camera.rs @@ -24,7 +24,7 @@ impl Default for CameraMode { fn default() -> Self { Self::ThirdPerson } } -#[derive(Clone)] +#[derive(Clone, Copy)] pub struct Dependents { pub view_mat: Mat4, pub proj_mat: Mat4, @@ -116,7 +116,7 @@ impl Camera { ) } - pub fn dependents(&self) -> Dependents { self.dependents.clone() } + pub fn dependents(&self) -> Dependents { &self.dependents } /// Rotate the camera about its focus by the given delta, limiting the input /// accordingly.