Dont use globing pub use, they are buggy.

This commit is contained in:
Sébastien Crozet 2013-08-31 17:14:41 +02:00
parent f762891ecf
commit 9ecafc5cdf
4 changed files with 51 additions and 55 deletions

View File

@ -6,20 +6,20 @@ use std::cmp::ApproxEq;
use std::vec::{VecIterator, VecMutIterator};
use vec::{Vec1, Vec2, Vec3, Vec4, Vec5, Vec6, Outer};
pub use traits::dim::*;
pub use traits::indexable::*;
pub use traits::iterable::*;
pub use traits::scalar_op::*;
pub use traits::mat_cast::*;
pub use traits::column::*;
pub use traits::row::*;
pub use traits::inv::*;
pub use traits::rlmul::*;
pub use traits::rotation::*;
pub use traits::transformation::*;
pub use traits::translation::*;
pub use traits::transpose::*;
pub use traits::homogeneous::*;
pub use traits::dim::Dim;
pub use traits::indexable::Indexable;
pub use traits::iterable::{Iterable, IterableMut};
pub use traits::scalar_op::{ScalarSub, ScalarAdd};
pub use traits::mat_cast::MatCast;
pub use traits::column::Column;
pub use traits::inv::Inv;
pub use traits::rlmul::{RMul, LMul};
pub use traits::rotation::{Rotation, Rotate};
pub use traits::transformation::{Transformation, Transform};
pub use traits::translation::{Translation, Translate};
pub use traits::transpose::{Transpose};
pub use traits::homogeneous::{ToHomogeneous, FromHomogeneous};
pub use traits::row::Row;
mod mat_macros;

View File

@ -37,29 +37,28 @@ pub mod adaptors
pub mod types;
// FIXME: it would be better to hide all those from the outside!
mod traits
pub mod traits
{
mod vector;
mod sample;
mod indexable;
mod column;
mod row;
mod iterable;
mod outer;
mod cross;
mod inv;
mod transpose;
mod dim;
mod basis;
mod rotation;
mod translation;
mod transformation;
mod rlmul;
mod scalar_op;
mod homogeneous;
mod vec_cast;
mod mat_cast;
pub mod vector;
pub mod sample;
pub mod indexable;
pub mod column;
pub mod row;
pub mod iterable;
pub mod outer;
pub mod cross;
pub mod inv;
pub mod transpose;
pub mod dim;
pub mod basis;
pub mod rotation;
pub mod translation;
pub mod transformation;
pub mod rlmul;
pub mod scalar_op;
pub mod homogeneous;
pub mod vec_cast;
pub mod mat_cast;
}
#[cfg(test)]

View File

@ -5,24 +5,21 @@ use std::vec::{VecIterator, VecMutIterator};
use std::iterator::{Iterator, FromIterator};
use std::cmp::ApproxEq;
use traits::translation::*;
use traits::transformation::*;
use traits::rotation::*;
use traits::translation::{Translation, Translate};
use traits::transformation::Transform;
use traits::rotation::Rotate;
pub use traits::homogeneous::*;
pub use traits::vec_cast::*;
pub use traits::vector::*;
pub use traits::basis::*;
pub use traits::dim::*;
pub use traits::basis::*;
pub use traits::indexable::*;
pub use traits::iterable::*;
pub use traits::sample::*;
pub use traits::scalar_op::*;
pub use traits::cross::*;
pub use traits::outer::*;
pub use traits::sample::*;
pub use traits::row::*;
pub use traits::homogeneous::{FromHomogeneous, ToHomogeneous};
pub use traits::vec_cast::VecCast;
pub use traits::vector::{Vec, VecExt, AlgebraicVec, AlgebraicVecExt};
pub use traits::basis::Basis;
pub use traits::dim::Dim;
pub use traits::indexable::Indexable;
pub use traits::iterable::{Iterable, IterableMut};
pub use traits::sample::UniformSphereSample;
pub use traits::scalar_op::{ScalarAdd, ScalarSub};
pub use traits::cross::{Cross, CrossMatrix};
pub use traits::outer::Outer;
mod vec_macros;

View File

@ -1,6 +1,6 @@
use std::num::{Zero, One};
use vec::{Vec1, Vec2, Vec3, Row, AlgebraicVec, VecCast, UniformSphereSample, Cross, CrossMatrix, Basis};
use mat::Mat3;
use vec::{Vec1, Vec2, Vec3, AlgebraicVec, VecCast, UniformSphereSample, Cross, CrossMatrix, Basis};
use mat::{Mat3, Row};
impl<N: Mul<N, N> + Sub<N, N>> Cross<Vec1<N>> for Vec2<N> {
#[inline]