Damus
ARGVMI~1.PIF profile picture
ARGVMI~1.PIF
I don't believe I would have had this particular problem in Rust, because Rust fields, unlike Java ones, have a well-defined order.

They're not necessarily alphabetically sorted (that's up to the programmer), but I don't actually need them to be; I just need the order to be consistent.

The exception is Rust's HashMap, which intentionally uses a random order. IIRC it's to mitigate a potential denial-of-service attack. No problem if you use TreeMap or Vec<(_, _)> or something like that, though.