ParkMyCar / compact_str

A memory efficient string type that can store up to 24* bytes on the stack
MIT License
558 stars 41 forks source link

Impl `Clone::clone_from` for `CompactString` #325

Closed NobodyXu closed 8 months ago

NobodyXu commented 8 months ago

As an optimization for certain usecase where you already have a CompactString and want to reuse the heap allocation.

Kijewski commented 8 months ago

Ahh, I never understood why clone_from() exists. Thank you for your explanation!

ParkMyCar commented 8 months ago

Neat! Great improvement :)