Nice. There's a more generic version for the inline part called ArrayString in crate arrayvec (contributed by @tbu- !); it's generic over a set of backing sizes. Feel free to copy the array-parametrization approach.
My original fear was that this would break StringExt from being object safe, but I see now that the InlineString impl(s) and not the StringExt trait would use this so there is nothing to worry about.
From https://www.reddit.com/r/rust/comments/3v2uzv/inlinable_string_a_dropin_replacement_for/cxjwhvx:
My original fear was that this would break
StringExt
from being object safe, but I see now that theInlineString
impl(s) and not theStringExt
trait would use this so there is nothing to worry about.