Skip to content

Commit

Permalink
Fix compilation errors/warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eira-fransham committed Jan 8, 2021
1 parent 72fa4bd commit 95218b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extern crate collision;

use collision::PlaneBound;

fn _box(_: Box<PlaneBound<f32>>) {}
fn _box(_: Box<dyn PlaneBound<f32>>) {}

#[test]
fn bound_box() {}
6 changes: 3 additions & 3 deletions tests/dbvt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ extern crate cgmath;
extern crate collision;
extern crate rand;

use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
use cgmath::prelude::*;
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
use collision::dbvt::*;
use collision::prelude::*;
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
use rand::Rng;

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -122,7 +122,7 @@ fn test_add_20() {
let mut tree = DynamicBoundingVolumeTree::<Value2>::new();
let mut rng = rand::thread_rng();
for i in 0..20 {
let offset = rng.gen_range(-10., 10.);
let offset = rng.gen_range(-10f32..10f32);
tree.insert(Value2::new(
i,
aabb2(offset + 0.1, offset + 0.1, offset + 0.3, offset + 0.3),
Expand Down

0 comments on commit 95218b7

Please sign in to comment.