From b6049b28e28cefd0593066bbce13162dcad29e1e Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Mon, 10 Dec 2012 10:38:41 +1000 Subject: [PATCH] Remove comma separated inheritance lists --- src/angle.rs | 18 +++++++++--------- src/color/color.rs | 2 +- src/mat.rs | 2 +- src/num/kinds.rs | 4 ++-- src/quat.rs | 2 +- src/vec.rs | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/angle.rs b/src/angle.rs index 753c5ea..8fde774 100644 --- a/src/angle.rs +++ b/src/angle.rs @@ -10,15 +10,15 @@ use vec::Vec3; /** * The base trait for anglular units */ -pub trait Angle: Add, - Sub, - Mul, - Div, - // Div, // TODO: not sure how to implement this, or if it is even possible... - Modulo, - // Modulo, // TODO: not sure how to implement this, or if it is even possible... - Neg, - Eq, Ord { +pub trait Angle: Add + Sub + Mul + Div + // Div // TODO: not sure how to implement this, or if it is even possible... + Modulo + // Modulo // TODO: not sure how to implement this, or if it is even possible... + Neg + Eq Ord { static pure fn full_turn() -> self; static pure fn half_turn() -> self; static pure fn quadrant() -> self; diff --git a/src/color/color.rs b/src/color/color.rs index b455a1e..c36db41 100644 --- a/src/color/color.rs +++ b/src/color/color.rs @@ -13,7 +13,7 @@ use num::kinds::{Float, Number}; /** * A generic color trait. */ -pub trait Color: Dimensional, ToPtr, Eq { +pub trait Color: Dimensional ToPtr Eq { /** * # Return value * diff --git a/src/mat.rs b/src/mat.rs index c1fce06..9efc68a 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -26,7 +26,7 @@ use vec::{NumericVector, Vec2, Vec3, Vec4}; * floating point type and have the same number of dimensions as the * number of rows and columns in the matrix. */ -pub trait Matrix: Dimensional, ToPtr, Eq, Neg { +pub trait Matrix: Dimensional ToPtr Eq Neg { /** * # Return value * diff --git a/src/num/kinds.rs b/src/num/kinds.rs index 305695f..67c632c 100644 --- a/src/num/kinds.rs +++ b/src/num/kinds.rs @@ -4,7 +4,7 @@ use std::cmp::FuzzyEq; use num::conv::NumConv; -pub trait Number: Eq, Num, NumConv, Ord { +pub trait Number: Eq Num NumConv Ord { /** * Construct a new number by casting a number the the static method's * enclosing type @@ -232,7 +232,7 @@ pub impl i64: Integer {} pub impl int: Integer {} -pub trait Float: Number, FuzzyEq { +pub trait Float: Number FuzzyEq { pure fn to_float() -> float; static pure fn from_float(n: float) -> self; diff --git a/src/quat.rs b/src/quat.rs index 51e1ac6..0f806a4 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -34,7 +34,7 @@ use vec::Vec3; * * `V3` - The 3-dimensional vector type that will containin the imaginary * components of the quaternion. */ -pub trait Quaternion: Dimensional, ToPtr, Eq, Neg { +pub trait Quaternion: Dimensional ToPtr Eq Neg { static pure fn from_axis_angle>(axis: &Vec3, theta: A) -> self; /** diff --git a/src/vec.rs b/src/vec.rs index 5c65212..80ae902 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -18,7 +18,7 @@ use num::kinds::Number; * * `T` - The type of the components. This is intended to support boolean, * integer, unsigned integer, and floating point types. */ -pub trait Vector: Dimensional, ToPtr, Eq { +pub trait Vector: Dimensional ToPtr Eq { /** * Construct the vector from a single value, copying it to each component */ @@ -61,7 +61,7 @@ pub trait Vector4: Vector { /** * A vector with numeric components */ -pub trait NumericVector: Vector, Neg { +pub trait NumericVector: Vector Neg { /** * The standard basis vector * @@ -119,7 +119,7 @@ pub trait NumericVector: Vector, Neg { /** * A mutable vector with numeric components */ -pub trait MutableNumericVector: MutableVector<&self/T>, NumericVector { +pub trait MutableNumericVector: MutableVector<&self/T> NumericVector { /** * Negate the vector */ @@ -257,7 +257,7 @@ pub trait EuclideanVector: NumericVector { * * * `T` - The type of the components. This should be a floating point type. */ -pub trait MutableEuclideanVector: MutableNumericVector<&self/T>, +pub trait MutableEuclideanVector: MutableNumericVector<&self/T> EuclideanVector { /** * Normalize the vector