Function forced_cmp

Source
pub fn forced_cmp<T: PartialOrd>(a: T, b: T) -> Ordering
Expand description

Comparison between two values with only partial ordering (e.g. floating point numbers) that provides a fake full ordering by falling back to Ordering::Equal if non-comparable. Warning: this may not be what you want, but perhaps panic instead?