![]() # Objective Comparing two reflected floating points would always fail: ```rust let a: &dyn Reflect = &1.23_f32; let b: &dyn Reflect = &1.23_f32; // Panics: assert!(a.reflect_partial_eq(b).unwrap_or_default()); ``` The comparison returns `None` since `f32` (and `f64`) does not have a reflected `PartialEq` implementation. ## Solution Include `PartialEq` in the `impl_reflect_value!` macro call for both `f32` and `f64`. `Hash` is still excluded since neither implement `Hash`. Also added equality tests for some of the common types from `std` (including `f32`). |
||
---|---|---|
.. | ||
glam.rs | ||
smallvec.rs | ||
std.rs |