Skip to content

Commit f233f67

Browse files
Merge #118
118: Update to latest version of all dependencies r=kvark a=Vurich <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rustgd/collision-rs/118) <!-- Reviewable:end --> Co-authored-by: Jef <[email protected]>
2 parents 122169f + 95218b7 commit f233f67

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ keywords = ["gamedev", "cgmath", "collision"]
3232
name = "collision"
3333

3434
[dependencies]
35-
rand = "0.6"
36-
approx = "0.3" # Only for the macros; for all other instances use the re-exported cgmath ones.
37-
cgmath = "0.17"
35+
rand = "0.8"
36+
approx = "0.4" # Only for the macros; for all other instances use the re-exported cgmath ones.
37+
cgmath = "0.18"
3838
serde = { version = "1.0", optional = true, features = ["derive"] }
3939
bit-set = "0.5"
40-
smallvec = "0.6.1"
40+
smallvec = "1.6"
41+
num = { version = "0.3", optional = true, features = ["serde"] }
4142

42-
[target.'cfg(feature="serde")'.dependencies]
43-
cgmath = { version = "0.17", features = ["serde"] }
44-
num = { version = "0.2", features = ["serde"] }
43+
[features]
44+
use-serde = ["serde", "cgmath/serde", "num"]
4545

4646
[dev-dependencies]
47-
genmesh = "0.5"
47+
genmesh = "0.6"
4848

src/dbvt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ where
900900

901901
// Only do rotations occasionally, as they are fairly expensive, and shouldn't be overused.
902902
// For most scenarios, the majority of shapes will not have moved, so this is fine.
903-
if rand::thread_rng().gen_range(0, 100) < PERFORM_ROTATION_PERCENTAGE {
903+
if rand::thread_rng().gen_range(0..100) < PERFORM_ROTATION_PERCENTAGE {
904904
self.rotate(node_index);
905905
}
906906
}

tests/bound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extern crate collision;
22

33
use collision::PlaneBound;
44

5-
fn _box(_: Box<PlaneBound<f32>>) {}
5+
fn _box(_: Box<dyn PlaneBound<f32>>) {}
66

77
#[test]
88
fn bound_box() {}

tests/dbvt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ extern crate cgmath;
22
extern crate collision;
33
extern crate rand;
44

5-
use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
65
use cgmath::prelude::*;
7-
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
6+
use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
87
use collision::dbvt::*;
98
use collision::prelude::*;
9+
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
1010
use rand::Rng;
1111

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

0 commit comments

Comments
 (0)