fitzgen / bumpalo

A fast bump allocation arena for Rust
https://docs.rs/bumpalo
Apache License 2.0
1.39k stars 110 forks source link

Simplify code handling ZSTs #73

Closed Amanieu closed 4 years ago

Amanieu commented 4 years ago

Allocation of ZSTs is very rare, so remove checks for zero-sized layouts in the fast path and instead just use the normal code path which will bump the pointer by zero bytes.