Skip to content

Commit 4d05eb1

Browse files
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
1 parent 179f719 commit 4d05eb1

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

crates/bevy_reflect/src/lib.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ mod tests {
493493
#[derive(Reflect, Clone, Debug, PartialEq)]
494494
struct Bar {
495495
y: u8,
496-
z: ::glam::Mat4,
497496
}
498497

499498
#[derive(Reflect, Clone, Debug, PartialEq)]
@@ -502,21 +501,15 @@ mod tests {
502501
s: String,
503502
b: Bar,
504503
u: usize,
505-
t: (Vec3, String),
504+
t: ([f32; 3], String),
506505
}
507506

508507
let foo = Foo {
509508
x: 123,
510509
s: "String".to_string(),
511-
b: Bar {
512-
y: 255,
513-
z: ::glam::Mat4::from_cols_array(&[
514-
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,
515-
15.0,
516-
]),
517-
},
510+
b: Bar { y: 255 },
518511
u: 1111111111111,
519-
t: (Vec3::new(3.0, 2.0, 1.0), "Tuple String".to_string()),
512+
t: ([3.0, 2.0, 1.0], "Tuple String".to_string()),
520513
};
521514

522515
let foo2: Box<dyn Reflect> = Box::new(foo.clone());

0 commit comments

Comments
 (0)