How to test TOML serialization for a HashMap?

⚓ Rust    📅 2025-09-22    👤 surdeus    👁️ 7      

surdeus

Warning

This post was published 39 days ago. The information described in this article may have changed.

Hi folks,

I'm using Serde TOML crate (toml = "0.9.7") to serialize a struct that has a HashMap field. The problem is that the generated String randomly shuffles the HashMap elements and therefore my tests randomly fails. Could you please recommend a solution for testing?

Thank you.

5 posts - 4 participants

Read full topic

🏷️ Rust_feed