From dd973d2e4963db23b470e659c5d56fb8bb2c7d9e Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Fri, 21 Dec 2012 14:08:43 +1000 Subject: [PATCH] Remove deprecated moves --- src/mat2.rs | 7 +++---- src/mat3.rs | 10 ++++------ src/mat4.rs | 13 +++++-------- src/quat.rs | 4 ++-- src/vec2.rs | 2 +- src/vec3.rs | 2 +- src/vec4.rs | 2 +- 7 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/mat2.rs b/src/mat2.rs index 178ed4d..b74a688 100644 --- a/src/mat2.rs +++ b/src/mat2.rs @@ -48,8 +48,8 @@ pub impl Mat2 { #[inline(always)] static pure fn new(c0r0: T, c0r1: T, c1r0: T, c1r1: T) -> Mat2 { - Mat2::from_cols(Vec2::new(move c0r0, move c0r1), - Vec2::new(move c1r0, move c1r1)) + Mat2::from_cols(Vec2::new(c0r0, c0r1), + Vec2::new(c1r0, c1r1)) } /** @@ -72,8 +72,7 @@ pub impl Mat2 { #[inline(always)] static pure fn from_cols(c0: Vec2, c1: Vec2) -> Mat2 { - Mat2 { x: move c0, - y: move c1 } + Mat2 { x: c0, y: c1 } } /** diff --git a/src/mat3.rs b/src/mat3.rs index b5af2df..8311a10 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -53,9 +53,9 @@ pub impl Mat3 { static pure fn new(c0r0:T, c0r1:T, c0r2:T, c1r0:T, c1r1:T, c1r2:T, c2r0:T, c2r1:T, c2r2:T) -> Mat3 { - Mat3::from_cols(Vec3::new(move c0r0, move c0r1, move c0r2), - Vec3::new(move c1r0, move c1r1, move c1r2), - Vec3::new(move c2r0, move c2r1, move c2r2)) + Mat3::from_cols(Vec3::new(c0r0, c0r1, c0r2), + Vec3::new(c1r0, c1r1, c1r2), + Vec3::new(c2r0, c2r1, c2r2)) } /** @@ -82,9 +82,7 @@ pub impl Mat3 { static pure fn from_cols(c0: Vec3, c1: Vec3, c2: Vec3) -> Mat3 { - Mat3 { x: move c0, - y: move c1, - z: move c2 } + Mat3 { x: c0, y: c1, z: c2 } } /** diff --git a/src/mat4.rs b/src/mat4.rs index b23cb5a..5e5e696 100644 --- a/src/mat4.rs +++ b/src/mat4.rs @@ -57,10 +57,10 @@ pub impl Mat4 { c1r0: T, c1r1: T, c1r2: T, c1r3: T, c2r0: T, c2r1: T, c2r2: T, c2r3: T, c3r0: T, c3r1: T, c3r2: T, c3r3: T) -> Mat4 { - Mat4::from_cols(Vec4::new(move c0r0, move c0r1, move c0r2, move c0r3), - Vec4::new(move c1r0, move c1r1, move c1r2, move c1r3), - Vec4::new(move c2r0, move c2r1, move c2r2, move c2r3), - Vec4::new(move c3r0, move c3r1, move c3r2, move c3r3)) + Mat4::from_cols(Vec4::new(c0r0, c0r1, c0r2, c0r3), + Vec4::new(c1r0, c1r1, c1r2, c1r3), + Vec4::new(c2r0, c2r1, c2r2, c2r3), + Vec4::new(c3r0, c3r1, c3r2, c3r3)) } /** @@ -91,10 +91,7 @@ pub impl Mat4 { c1: Vec4, c2: Vec4, c3: Vec4) -> Mat4 { - Mat4 { x: move c0, - y: move c1, - z: move c2, - w: move c3 } + Mat4 { x: c0, y: c1, z: c2, w: c3 } } /** diff --git a/src/quat.rs b/src/quat.rs index 53f1ce5..740959c 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -215,7 +215,7 @@ pub impl Quat { */ #[inline(always)] static pure fn new(w: T, xi: T, yj: T, zk: T) -> Quat { - Quat::from_sv(move w, move Vec3::new(move xi, move yj, move zk)) + Quat::from_sv(w, Vec3::new(xi, yj, zk)) } /** @@ -228,7 +228,7 @@ pub impl Quat { */ #[inline(always)] static pure fn from_sv(s: T, v: Vec3) -> Quat { - Quat { s: move s, v: move v } + Quat { s: s, v: v } } #[inline(always)] diff --git a/src/vec2.rs b/src/vec2.rs index ff3e626..3660e87 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -28,7 +28,7 @@ pub struct Vec2 { x: T, y: T } pub impl Vec2/*: Vector2*/ { #[inline(always)] static pure fn new(x: T, y: T ) -> Vec2 { - Vec2 { x: move x, y: move y } + Vec2 { x: x, y: y } } } diff --git a/src/vec3.rs b/src/vec3.rs index c298e67..3ab107d 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -29,7 +29,7 @@ pub struct Vec3 { x: T, y: T, z: T } pub impl Vec3/*: Vector3*/ { #[inline(always)] static pure fn new(x: T, y: T, z: T) -> Vec3 { - Vec3 { x: move x, y: move y, z: move z } + Vec3 { x: x, y: y, z: z } } } diff --git a/src/vec4.rs b/src/vec4.rs index b399586..2a55126 100644 --- a/src/vec4.rs +++ b/src/vec4.rs @@ -30,7 +30,7 @@ pub struct Vec4 { x: T, y: T, z: T, w: T } pub impl Vec4/*: Vector4*/ { #[inline(always)] static pure fn new(x: T, y: T, z: T, w: T) -> Vec4 { - Vec4 { x: move x, y: move y, z: move z, w: move w } + Vec4 { x: x, y: y, z: z, w: w } } }