Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make alloc optional #202

Open
burdges opened this issue Feb 16, 2020 · 0 comments
Open

Make alloc optional #202

burdges opened this issue Feb 16, 2020 · 0 comments

Comments

@burdges
Copy link

burdges commented Feb 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant