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
fix(sort): replace Element::cmp with key-based comparison to ensure total ordering
Rust 1.92's stricter sort checking panics when the comparison function
violates total ordering requirements. The Element::cmp implementation
had two issues:
1. PartialEq used pointer comparison while Ord used content comparison
2. Natural sorting was applied inconsistently, breaking transitivity
Replace the `elem_a.cmp(elem_b)` call in ElementRaw::sort() with a
custom key-based comparison that provides a consistent total order:
- INDEX sub-element (numeric, for BSW elements)
- Item name with natural sorting via (base, number, name) tuple
- Definition ref (for BSW elements without names)
- First child character data (for reference elements)
Also remove the nested workspace in autosar-data/Cargo.toml to fix
"multiple workspace roots" build error.
0 commit comments