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

View File

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

View File

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

View File

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