thin-vec
thin-vec copied to clipboard
Make ThinVec::new constant
I am not sure if there are any technical blockers on this... can ThinVec::new
be made const
?
Having to reinitialize every instance causes a very slight regression when I moved from Vec
to ThinVec
. I'd much rather it copies from pre-generated bits based on const
.
Any chance to do this?
Since a single, shared static
header is used for empty ThinVec
s, having the current ThinVec::new
be a const fn
is only possible once Rust's const_refs_to_static
feature becomes stable.