rustgd / cgmath

A linear algebra and mathematics library for computer graphics.
https://docs.rs/cgmath
Apache License 2.0
1.12k stars 155 forks source link

Fix a type argument in benchmarks #517

Closed chengluyu closed 4 years ago

chengluyu commented 4 years ago

Rotation3’s type argument is an associated type now. Therefore this line https://github.com/rustgd/cgmath/blob/84da664455df0ec6d7583131e985ffd3a184a2f4/benches/construction.rs#L32 will cause following error when running cargo bench.

error[E0107]: wrong number of type arguments: expected 0, found 1
  --> benches/construction.rs:32:39
   |
32 | fn bench_from_axis_angle<T: Rotation3<f32>>(bh: &mut Bencher) {
   |                                       ^^^ unexpected type argument

error: aborting due to previous error

This PR is intended to fix this.


My environments: