From 1dbe6c43af665743083adb7b9f17d4e4460045ba Mon Sep 17 00:00:00 2001 From: Jakob Hellermann Date: Mon, 4 Jul 2022 14:17:46 +0000 Subject: [PATCH] bevy_reflect: remove `glam` from a test which is active without the glam feature (#5195) # Objective `glam` is an optional feature in `bevy_reflect` and there is a separate `mod test { #[cfg(feature = "glam")] mod glam { .. }}`. The `reflect_downcast` test is not in that module and doesn't depend on glam, which breaks `cargo test -p bevy_reflect` without the `glam` feature. ## Solution - Remove the glam types from the test, they're not relevant to it --- crates/bevy_reflect/src/lib.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index 602ea2d11eee9..7fd60f0f928b3 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -493,7 +493,6 @@ mod tests { #[derive(Reflect, Clone, Debug, PartialEq)] struct Bar { y: u8, - z: ::glam::Mat4, } #[derive(Reflect, Clone, Debug, PartialEq)] @@ -502,21 +501,15 @@ mod tests { s: String, b: Bar, u: usize, - t: (Vec3, String), + t: ([f32; 3], String), } let foo = Foo { x: 123, s: "String".to_string(), - b: Bar { - y: 255, - z: ::glam::Mat4::from_cols_array(&[ - 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, - 15.0, - ]), - }, + b: Bar { y: 255 }, u: 1111111111111, - t: (Vec3::new(3.0, 2.0, 1.0), "Tuple String".to_string()), + t: ([3.0, 2.0, 1.0], "Tuple String".to_string()), }; let foo2: Box = Box::new(foo.clone());