|
|
|
|
|
by yorwba
3330 days ago
|
|
The problem was in the context of looking up min_by_key with the key being a floating-point number, so I think the only NaN-check necessary should be for that key. I did not intend to imply that it should be done for all calculations, only those that need totally-ordered floats. (Or if you are really sure NaN will never happen, you leave out the check altogether, and claim total ordering anyway.) |
|
[1] https://github.com/rust-lang/rfcs/blob/master/text/1210-impl...