Skip to content

Make alloc optional #202

@burdges

Description

@burdges

It might be handy if we'd some way to make alloc optional. One solution would be if users conditionally reexported smallvec and arrayvec.

#[cfg(feature = "alloc")]
pub use smallvec::SmallVec as TInyVec;

#[cfg(not(feature = "alloc"))]
pub use arrayvec::ArrayVec as TinyVec;

It's possible the smallvec and arrayvec crates should be brought into closer alignment for this approach, like maybe some panicing methods should gain non-panicing variants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions