You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FloatEq is currently implemented over the following types:
f32
f64
[T; n] where T: FloatEq
num::Complex<T> where T: FloatEq (behind a feature flag)
It would be helpful to expand this to be implemented over a similar range of standard container types as PartialEq is, This is a list of the potentially relevant impls, using the PartialEq Implementors list as of version 1.43.1:
Implementation across tuples is dependent on thinking more generally about how epsilon values should apply to heterogeneous types, and whether they ought to be supported at all.
FloatEq is currently implemented over the following types:
f32
f64
[T; n] where T: FloatEq
num::Complex<T> where T: FloatEq
(behind a feature flag)It would be helpful to expand this to be implemented over a similar range of standard container types as
PartialEq
is, This is a list of the potentially relevant impls, using the PartialEq Implementors list as of version 1.43.1:Special
Reference types (immutable)
TODO: The corresponsing
a == &b
and&a == b
are missing from PartialEq because of this issue, but do we have the same restraint? EDIT: yes.Reference types (mutable)
Slices
Arrays
Tuples
Implementation across tuples is dependent on thinking more generally about how epsilon values should apply to heterogeneous types, and whether they ought to be supported at all.
Vec
TODO: Is
impl<'_, const N: usize, A, B> PartialEq<&'_ mut [B; N]> for Vec<A>
missing?VecDeque
Set collections
TODO: I assume that HashSet is a bad target since it requires Eq, whereas BTrees might be more amenable.
Map collections
TODO: I assume these should these be FloatEq over just their values, since they require Eq on keys.
Result
TODO: Should this just be over
T: FloatEq
, or should E also be involved?Cow
Simple inner type
The text was updated successfully, but these errors were encountered: