fitzgen / inlinable_string

An owned, grow-able UTF-8 string that stores small strings inline and avoids heap-allocation.
http://fitzgen.github.io/inlinable_string/inlinable_string/index.html
Other
69 stars 11 forks source link

impl From<String> for InlinableString #6

Closed maciejhirsz closed 7 years ago

maciejhirsz commented 7 years ago

In a situation where a String is already allocated, having a shortcut to create a InlinableString::Heap might be helpful.

Additionally, this enables static generic implementations for S: Into<InlinableString> accepting either &str or String.

fitzgen commented 7 years ago

Thanks!

fitzgen commented 7 years ago

@maciejhirsz would you like to be a co-owner of this crate?