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
The design principles of float_eq make enums difficult to implement the extension traits over, since as it stands all branches of the enum would need to be a floating point type. This obviously makes it difficult to implement for a type like Result, where it is likely that only one of the result type or error type would be comparable. I believe that a way forward would involve thinking through one or more of these options in detail:
Implementation only over main result type T (such that the error type is either never equal or using PartialEq).
Specialisation over either T, E or both (requires specialisation to be stabilised).
Blanket implementation of float_eq comparison traits over non-floating point types (also requires specialisation?).
Therefore, I'm leaving this issue here in case it becomes viable in future, but for now I'm leaving enums (and therefore Result) be.
The text was updated successfully, but these errors were encountered:
The design principles of
float_eq
make enums difficult to implement the extension traits over, since as it stands all branches of the enum would need to be a floating point type. This obviously makes it difficult to implement for a type like Result, where it is likely that only one of the result type or error type would be comparable. I believe that a way forward would involve thinking through one or more of these options in detail:float_eq
comparison traits over non-floating point types (also requires specialisation?).Therefore, I'm leaving this issue here in case it becomes viable in future, but for now I'm leaving enums (and therefore
Result
) be.The text was updated successfully, but these errors were encountered: