pub fn compare_cells(a: &CellValue, b: &CellValue) -> OrderingExpand description
Total deterministic ordering for CellValue.
Behavior:
- Same-kind numeric values compare numerically; decimals use
f64::total_cmpsoNaNis ordered consistently (after all finite values, and0.0before-0.0is reversed bytotal_cmpsemantics — we keep that contract). - Mixed
Integer/Decimalpairs compare numerically. Nonealways sorts before every other variant.- Cross-type non-numeric pairs fall back to a stable type-rank order so
the return value is never
Equalfor genuinely different values.
Use std::cmp::Ordering directly via slice::sort_by; do not rely on
whatever a future PartialOrd derive might produce.