Rust struct that stores tiny strings in the pointer itself Posted by brundolf on Tuesday May 25, 2021 @03:43PM from the github.com dept. https://github.com/dtolnay/semver/blob/1.0.0-rc.1/src/identifier.rs ( 1 comment | 4 points | on HN )
This is commonly known as Small String / Small Buffer Optimization. This is how most implementations of C++'s std::string work also.