LPGhatguy / thunderdome

Arena type inspired by generational-arena
Apache License 2.0
197 stars 15 forks source link

Implement Serde support #33

Open LPGhatguy opened 2 years ago

LPGhatguy commented 2 years ago

Closes #32.

This implements Serde support for thunderdome::Arena<T> for any T that has Serde support. Documentation and tests show pretty well what the format is. Notably, empty slots are serialized as well as occupied ones in order to preserve their generation.

I've bumped the crate's MSRV to 1.36.0 to gain support for MaybeUninit, used by Serde. It's a small bump, so I'm not very worried about it.

tyler274 commented 1 year ago

You should be able to use matches now since you bumped the MSRV to 1.47, as matches is stable since 1.42. I unintentionally made this change following guidance from Clippy in my typed index PR.