Skip to content

Consider arrayvec::ArrayString's trick for making the inline size generic #2

Description

@fitzgen

From https://www.reddit.com/r/rust/comments/3v2uzv/inlinable_string_a_dropin_replacement_for/cxjwhvx:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions