Merge pull request #80 from zsiciarz/master

Update to latest rustc
This commit is contained in:
Sébastien Crozet 2015-01-25 00:07:32 +01:00
commit bbf5ed17e4
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ use std::mem;
use structs::dvec::DVec;
use traits::operations::{Inv, Transpose, Mean, Cov};
use traits::structure::{Cast, ColSlice, RowSlice, Diag, Eye, Indexable, Shape, Zero, One, BaseNum};
use std::fmt::{Show, Debug, Formatter, Result, String};
use std::fmt::{Debug, Display, Formatter, Result};
#[cfg(feature="arbitrary")]
use quickcheck::{Arbitrary, Gen};
@ -634,7 +634,7 @@ impl<N: ApproxEq<N>> ApproxEq<N> for DMat<N> {
}
}
impl<N: Show + Copy + String> Debug for DMat<N> {
impl<N: Debug + Copy + Display> Debug for DMat<N> {
fn fmt(&self, form:&mut Formatter) -> Result {
for i in (0us .. self.nrows()) {
for j in (0us .. self.ncols()) {

View File

@ -127,7 +127,7 @@ fn test_inv_mat6() {
fn test_rotation2() {
for _ in (0us .. 10000) {
let randmat: na::Rot2<f64> = na::one();
let ang = Vec1::new(na::abs(&random::<f64>()) % BaseFloat::pi());
let ang = Vec1::new(na::abs(&random::<f64>()) % <f64 as BaseFloat>::pi());
assert!(na::approx_eq(&na::rotation(&na::append_rotation(&randmat, &ang)), &ang));
}
@ -145,7 +145,7 @@ fn test_inv_rotation3() {
for _ in (0us .. 10000) {
let randmat: Rot3<f64> = na::one();
let dir: Vec3<f64> = random();
let ang = na::normalize(&dir) * (na::abs(&random::<f64>()) % BaseFloat::pi());
let ang = na::normalize(&dir) * (na::abs(&random::<f64>()) % <f64 as BaseFloat>::pi());
let rot = na::append_rotation(&randmat, &ang);
assert!(na::approx_eq(&(na::transpose(&rot) * rot), &na::one()));