diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index 6b66bb29..e66d1edb 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -2,8 +2,8 @@ #![allow(missing_doc)] // we hide doc to not have to document the $trhs double dispatch trait. -use rand::Rand; -use rand; +use std::rand::Rand; +use std::rand; use std::num::{One, Zero}; use traits::operations::ApproxEq; use std::mem; diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 2781b7f9..a5200dfa 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -3,8 +3,8 @@ #![allow(missing_doc)] // we hide doc to not have to document the $trhs double dispatch trait. use std::num::{Zero, One, Float}; -use rand::Rand; -use rand; +use std::rand::Rand; +use std::rand; use std::slice::{Items, MutItems}; use traits::operations::ApproxEq; use std::iter::FromIterator; diff --git a/src/structs/spec/mat.rs b/src/structs/spec/mat.rs index ccd307c2..e44c2e06 100644 --- a/src/structs/spec/mat.rs +++ b/src/structs/spec/mat.rs @@ -122,7 +122,7 @@ impl Row> for Mat3 { 0 => Vec3::new(self.m11.clone(), self.m12.clone(), self.m13.clone()), 1 => Vec3::new(self.m21.clone(), self.m22.clone(), self.m23.clone()), 2 => Vec3::new(self.m31.clone(), self.m32.clone(), self.m33.clone()), - _ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " rows.") + _ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str()) } } @@ -144,7 +144,7 @@ impl Row> for Mat3 { self.m32 = r.y.clone(); self.m33 = r.z; }, - _ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " rows.") + _ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str()) } } @@ -162,7 +162,7 @@ impl Col> for Mat3 { 0 => Vec3::new(self.m11.clone(), self.m21.clone(), self.m31.clone()), 1 => Vec3::new(self.m12.clone(), self.m22.clone(), self.m32.clone()), 2 => Vec3::new(self.m13.clone(), self.m23.clone(), self.m33.clone()), - _ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " cols.") + _ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() ) } } @@ -184,7 +184,7 @@ impl Col> for Mat3 { self.m23 = r.y.clone(); self.m33 = r.z; }, - _ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " cols.") + _ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() ) } } diff --git a/src/structs/spec/vec.rs b/src/structs/spec/vec.rs index 5b747808..1ab7ef13 100644 --- a/src/structs/spec/vec.rs +++ b/src/structs/spec/vec.rs @@ -53,7 +53,7 @@ impl Row> for Vec2 { match i { 0 => Vec1::new(self.x.clone()), 1 => Vec1::new(self.y.clone()), - _ => fail!("Index out of range: 2d vectors do not have " + i.to_str() + " rows.") + _ => fail!("Index out of range: 2d vectors do not have {} rows. ", i.to_str()) } } @@ -62,7 +62,7 @@ impl Row> for Vec2 { match i { 0 => self.x = r.x, 1 => self.y = r.x, - _ => fail!("Index out of range: 2d vectors do not have " + i.to_str() + " rows.") + _ => fail!("Index out of range: 2d vectors do not have {} rows.", i.to_str()) } }