Skip to content

Commit 39fd7c1

Browse files
committed
Silence warnings and replace Show by Debug.
1 parent 7c45887 commit 39fd7c1

File tree

11 files changed

+39
-36
lines changed

11 files changed

+39
-36
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
8181
#![deny(non_upper_case_globals)]
8282
#![deny(unused_qualifications)]
8383
#![deny(unused_results)]
84-
#![allow(unstable)]
8584
#![warn(missing_docs)]
8685
#![feature(unboxed_closures)]
86+
#![feature(rand)]
87+
#![feature(hash)]
88+
#![feature(core)]
89+
#![feature(std_misc)]
8790
#![doc(html_root_url = "http://nalgebra.org/doc")]
8891

8992
extern crate "rustc-serialize" as rustc_serialize;

src/structs/dvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use traits::structure::{Iterable, IterableMut, Indexable, Shape, BaseFloat, Base
1515
use quickcheck::{Arbitrary, Gen};
1616

1717
/// Heap allocated, dynamically sized vector.
18-
#[derive(Eq, PartialEq, Show, Clone)]
18+
#[derive(Eq, PartialEq, Debug, Clone)]
1919
pub struct DVec<N> {
2020
/// Components of the vector. Contains as much elements as the vector dimension.
2121
pub at: Vec<N>

src/structs/iso.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use quickcheck::{Arbitrary, Gen};
2323
///
2424
/// This is the composition of a rotation followed by a translation.
2525
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
26-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
26+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
2727
pub struct Iso2<N> {
2828
/// The rotation applicable by this isometry.
2929
pub rotation: Rot2<N>,
@@ -35,7 +35,7 @@ pub struct Iso2<N> {
3535
///
3636
/// This is the composition of a rotation followed by a translation.
3737
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
38-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
38+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
3939
pub struct Iso3<N> {
4040
/// The rotation applicable by this isometry.
4141
pub rotation: Rot3<N>,
@@ -46,7 +46,7 @@ pub struct Iso3<N> {
4646
/// Four dimensional isometry.
4747
///
4848
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
49-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
49+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
5050
pub struct Iso4<N> {
5151
/// The rotation applicable by this isometry.
5252
pub rotation: Rot4<N>,

src/structs/mat.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use quickcheck::{Arbitrary, Gen};
2020

2121

2222
/// Special identity matrix. All its operation are no-ops.
23-
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Show, Copy)]
23+
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Debug, Copy)]
2424
pub struct Identity;
2525

2626
impl Identity {
@@ -32,7 +32,7 @@ impl Identity {
3232
}
3333

3434
/// Square matrix of dimension 1.
35-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
35+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
3636
pub struct Mat1<N> {
3737
pub m11: N
3838
}
@@ -77,7 +77,7 @@ eigen_qr_impl!(Mat1, Vec1);
7777
arbitrary_impl!(Mat1, m11);
7878

7979
/// Square matrix of dimension 2.
80-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
80+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
8181
pub struct Mat2<N> {
8282
pub m11: N, pub m21: N,
8383
pub m12: N, pub m22: N
@@ -126,7 +126,7 @@ eigen_qr_impl!(Mat2, Vec2);
126126
arbitrary_impl!(Mat2, m11, m12, m21, m22);
127127

128128
/// Square matrix of dimension 3.
129-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
129+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
130130
pub struct Mat3<N> {
131131
pub m11: N, pub m21: N, pub m31: N,
132132
pub m12: N, pub m22: N, pub m32: N,
@@ -213,7 +213,7 @@ arbitrary_impl!(Mat3,
213213
);
214214

215215
/// Square matrix of dimension 4.
216-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
216+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
217217
pub struct Mat4<N> {
218218
pub m11: N, pub m21: N, pub m31: N, pub m41: N,
219219
pub m12: N, pub m22: N, pub m32: N, pub m42: N,
@@ -319,7 +319,7 @@ arbitrary_impl!(Mat4,
319319
);
320320

321321
/// Square matrix of dimension 5.
322-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
322+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
323323
pub struct Mat5<N> {
324324
pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N,
325325
pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N,
@@ -440,7 +440,7 @@ arbitrary_impl!(Mat5,
440440
);
441441

442442
/// Square matrix of dimension 6.
443-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
443+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
444444
pub struct Mat6<N> {
445445
pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N, pub m61: N,
446446
pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N, pub m62: N,

src/structs/ortho.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use quickcheck::{Arbitrary, Gen};
99
/// A 3D orthographic projection stored without any matrix.
1010
///
1111
/// Reading or modifying its individual properties is cheap but applying the transformation is costly.
12-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
12+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
1313
pub struct Ortho3<N> {
1414
width: N,
1515
height: N,
@@ -20,7 +20,7 @@ pub struct Ortho3<N> {
2020
/// A 3D orthographic projection stored as a 4D matrix.
2121
///
2222
/// Reading or modifying its individual properties is costly but applying the transformation is cheap.
23-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
23+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
2424
pub struct OrthoMat3<N> {
2525
mat: Mat4<N>
2626
}

src/structs/persp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use quickcheck::{Arbitrary, Gen};
88
/// A 3D perspective projection stored without any matrix.
99
///
1010
/// Reading or modifying its individual properties is cheap but applying the transformation is costly.
11-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
11+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
1212
pub struct Persp3<N> {
1313
aspect: N,
1414
fov: N,
@@ -19,7 +19,7 @@ pub struct Persp3<N> {
1919
/// A 3D perspective projection stored as a 4D matrix.
2020
///
2121
/// Reading or modifying its individual properties is costly but applying the transformation is cheap.
22-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Copy)]
22+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
2323
pub struct PerspMat3<N> {
2424
mat: Mat4<N>
2525
}

src/structs/pnt.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use quickcheck::{Arbitrary, Gen};
1717

1818

1919
/// Point of dimension 0.
20-
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Show, Copy)]
20+
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Debug, Copy)]
2121
pub struct Pnt0<N>;
2222

2323
impl<N> Pnt0<N> {
@@ -35,7 +35,7 @@ impl<N> Pnt0<N> {
3535
}
3636

3737
/// Point of dimension 1.
38-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
38+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
3939
pub struct Pnt1<N> {
4040
/// First component of the point.
4141
pub x: N
@@ -74,7 +74,7 @@ num_float_pnt_impl!(Pnt1, Vec1);
7474
arbitrary_pnt_impl!(Pnt1, x);
7575

7676
/// Point of dimension 2.
77-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
77+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
7878
pub struct Pnt2<N> {
7979
/// First component of the point.
8080
pub x: N,
@@ -115,7 +115,7 @@ num_float_pnt_impl!(Pnt2, Vec2);
115115
arbitrary_pnt_impl!(Pnt2, x, y);
116116

117117
/// Point of dimension 3.
118-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
118+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
119119
pub struct Pnt3<N> {
120120
/// First component of the point.
121121
pub x: N,
@@ -158,7 +158,7 @@ num_float_pnt_impl!(Pnt3, Vec3);
158158
arbitrary_pnt_impl!(Pnt3, x, y, z);
159159

160160
/// Point of dimension 4.
161-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
161+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
162162
pub struct Pnt4<N> {
163163
/// First component of the point.
164164
pub x: N,
@@ -203,7 +203,7 @@ num_float_pnt_impl!(Pnt4, Vec4);
203203
arbitrary_pnt_impl!(Pnt4, x, y, z, w);
204204

205205
/// Point of dimension 5.
206-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
206+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
207207
pub struct Pnt5<N> {
208208
/// First component of the point.
209209
pub x: N,
@@ -250,7 +250,7 @@ num_float_pnt_impl!(Pnt5, Vec5);
250250
arbitrary_pnt_impl!(Pnt5, x, y, z, w, a);
251251

252252
/// Point of dimension 6.
253-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
253+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
254254
pub struct Pnt6<N> {
255255
/// First component of the point.
256256
pub x: N,

src/structs/quat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use quickcheck::{Arbitrary, Gen};
2020

2121

2222
/// A quaternion.
23-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
23+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
2424
pub struct Quat<N> {
2525
/// The scalar component of the quaternion.
2626
pub w: N,
@@ -152,7 +152,7 @@ impl<N: ApproxEq<N> + BaseFloat> Div<Quat<N>> for Quat<N> {
152152

153153

154154
/// A unit quaternion that can represent a 3D rotation.
155-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Show, Copy)]
155+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Debug, Copy)]
156156
pub struct UnitQuat<N> {
157157
q: Quat<N>
158158
}

src/structs/rot.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use quickcheck::{Arbitrary, Gen};
1616

1717

1818
/// Two dimensional rotation matrix.
19-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Hash, Copy)]
19+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Hash, Copy)]
2020
pub struct Rot2<N> {
2121
submat: Mat2<N>
2222
}
@@ -101,7 +101,7 @@ impl<N: Arbitrary + Clone + BaseFloat + Neg<Output = N>> Arbitrary for Rot2<N> {
101101
* 3d rotation
102102
*/
103103
/// Three dimensional rotation matrix.
104-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Hash, Copy)]
104+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Hash, Copy)]
105105
pub struct Rot3<N> {
106106
submat: Mat3<N>
107107
}
@@ -306,7 +306,7 @@ impl<N: Arbitrary + Clone + BaseFloat> Arbitrary for Rot3<N> {
306306

307307

308308
/// Four dimensional rotation matrix.
309-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Show, Hash, Copy)]
309+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Hash, Copy)]
310310
pub struct Rot4<N> {
311311
submat: Mat4<N>
312312
}

src/structs/vec.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use quickcheck::{Arbitrary, Gen};
1919

2020

2121
/// Vector of dimension 0.
22-
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Show, Copy)]
22+
#[derive(Eq, PartialEq, RustcDecodable, Clone, Rand, Debug, Copy)]
2323
pub struct Vec0<N>;
2424

2525
impl<N> Vec0<N> {
@@ -37,7 +37,7 @@ impl<N> Vec0<N> {
3737
}
3838

3939
/// Vector of dimension 1.
40-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
40+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
4141
pub struct Vec1<N> {
4242
/// First component of the vector.
4343
pub x: N
@@ -87,7 +87,7 @@ absolute_vec_impl!(Vec1, x);
8787
arbitrary_impl!(Vec1, x);
8888

8989
/// Vector of dimension 2.
90-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
90+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
9191
pub struct Vec2<N> {
9292
/// First component of the vector.
9393
pub x: N,
@@ -139,7 +139,7 @@ absolute_vec_impl!(Vec2, x, y);
139139
arbitrary_impl!(Vec2, x, y);
140140

141141
/// Vector of dimension 3.
142-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
142+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
143143
pub struct Vec3<N> {
144144
/// First component of the vector.
145145
pub x: N,
@@ -194,7 +194,7 @@ arbitrary_impl!(Vec3, x, y, z);
194194

195195

196196
/// Vector of dimension 4.
197-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
197+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
198198
pub struct Vec4<N> {
199199
/// First component of the vector.
200200
pub x: N,
@@ -250,7 +250,7 @@ absolute_vec_impl!(Vec4, x, y, z, w);
250250
arbitrary_impl!(Vec4, x, y, z, w);
251251

252252
/// Vector of dimension 5.
253-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
253+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
254254
pub struct Vec5<N> {
255255
/// First component of the vector.
256256
pub x: N,
@@ -308,7 +308,7 @@ absolute_vec_impl!(Vec5, x, y, z, w, a);
308308
arbitrary_impl!(Vec5, x, y, z, w, a);
309309

310310
/// Vector of dimension 6.
311-
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Show, Copy)]
311+
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Hash, Rand, Debug, Copy)]
312312
pub struct Vec6<N> {
313313
/// First component of the vector.
314314
pub x: N,

0 commit comments

Comments
 (0)