matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.87k stars 109 forks source link

Documentation inconsistencies regarding parking_lot #129

Closed parasyte closed 3 years ago

parasyte commented 3 years ago

The parking_lot feature has been non-default since v1.0.0 (released 16 months ago). Docs claim it is enabled by default: https://github.com/matklad/once_cell/blob/a648913b27cb2a5ea0866c5ed7ca5eda4d2e3ad9/src/lib.rs#L236-L239

This section also claims the parking_lot feature saves up to 16 bytes. While a companion comment in Cargo.toml claims it saves up to 2 bytes. Which one of these claims is correct? https://github.com/matklad/once_cell/blob/a648913b27cb2a5ea0866c5ed7ca5eda4d2e3ad9/Cargo.toml#L22-L25