From da88cce8e302c2863fe399d32335d65080d6e57e Mon Sep 17 00:00:00 2001 From: Victor Cornillere Date: Fri, 24 May 2019 14:43:15 +0200 Subject: [PATCH] Fix grid test --- src/resources/experimental/spatial_grid.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/resources/experimental/spatial_grid.rs b/src/resources/experimental/spatial_grid.rs index 9c8c8ab..e4d68e2 100644 --- a/src/resources/experimental/spatial_grid.rs +++ b/src/resources/experimental/spatial_grid.rs @@ -76,7 +76,13 @@ mod tests { let global_transform = GlobalTransform::from(*transform_matrix.as_ref()); spatial_grid.insert(world.create_entity().build(), &global_transform); - assert!(spatial_grid.query(&global_transform, 1.0f32).len() == 1); + assert!( + spatial_grid + .query(&global_transform, 1.0f32) + .into_iter() + .count() + == 1 + ); } }