From a960afa4f92132b85f7005469ae78135ee2a6a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Tue, 21 Oct 2014 09:47:03 +0200 Subject: [PATCH] Make `AnyVec` inherit from `Basis`. Every vector must have a basis. --- src/traits/structure.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/traits/structure.rs b/src/traits/structure.rs index 6026ef1f..403b2bf2 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -157,7 +157,7 @@ pub trait VecAsPnt

{ /// Trait grouping most common operations on vectors. pub trait AnyVec: Dim + Sub + Add + Neg + Zero + PartialEq + Mul - + Div + Dot + Axpy { + + Div + Dot + Axpy + Basis { } /// Trait of vector with components implementing the `Float` trait. @@ -172,9 +172,9 @@ pub trait AnyVecExt: AnyVec + Indexable + Index + IndexM /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// operations on vectors. -pub trait FloatVecExt: FloatVec + AnyVecExt + Basis { } +pub trait FloatVecExt: FloatVec + AnyVecExt { } -impl + Add + Neg + Zero + PartialEq + Mul + Div + Dot + Axpy> +impl + Add + Neg + Zero + PartialEq + Mul + Div + Dot + Axpy + Basis> AnyVec for V { } impl + Norm> FloatVec for V { } @@ -184,7 +184,7 @@ impl + ScalarSub + Bounded> AnyVecExt for V { } -impl + AnyVecExt + Basis> FloatVecExt for V { } +impl + AnyVecExt> FloatVecExt for V { } /* * Pnt related traits.