From 26be22e73c2c988eae0f997a09bc5561930dc5fc Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Fri, 6 Nov 2020 12:49:20 -0800 Subject: [PATCH] fix unit test (#802) --- crates/bevy_ecs/hecs/src/query.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/crates/bevy_ecs/hecs/src/query.rs b/crates/bevy_ecs/hecs/src/query.rs index 0e66fe6982..81d6d35943 100644 --- a/crates/bevy_ecs/hecs/src/query.rs +++ b/crates/bevy_ecs/hecs/src/query.rs @@ -961,25 +961,16 @@ mod tests { // non existing components even when changing archetype. world.insert(e4, (A(0), B(0))).unwrap(); - let added_a = world - .query::<(Added, Entity)>() - .iter() - .map(|(_, e)| e) - .next(); + let added_a = world.query::<(Added, Entity)>().map(|(_, e)| e).next(); assert!(added_a.is_none()); assert_eq!(get_mutated_a(&mut world), vec![e4]); - let added_b = world - .query::<(Added, Entity)>() - .iter() - .map(|(_, e)| e) - .next(); + let added_b = world.query::<(Added, Entity)>().map(|(_, e)| e).next(); assert!(added_b.is_some()); let mutated_b = world .query_mut::<(Mutated, Entity)>() - .iter() .map(|(_, e)| e) .next(); assert!(mutated_b.is_none());