Is it safe to assume that the `None` variant of `Option>` is equivalent to `mem::zeroed()`?

⚓ rust    📅 2025-06-06    👤 surdeus    👁️ 3      

surdeus

I've been implementing a semi-concurrent hash-map for storing single values of different types, where each value is stored in an Option, as above. Using alloc_zeroed(), would I still have to manaully initialise each bucket in the map with None?

8 posts - 5 participants

Read full topic

🏷️ rust_feed