4 points · by brundolf · 5y ago · 1 comment
This is commonly known as Small String / Small Buffer Optimization. This is how most implementations of C++'s std::string work also.
semver/src/identifier.rs at 1.0.0-rc.1 · dtolnay/semver
Parser and evaluator for Cargo's flavor of Semantic Versioning - dtolnay/semver
GitHub