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

⚓ Rust    📅 2025-06-06    👤 surdeus    👁️ 6      

surdeus

Warning

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

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