You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The insert_many function is complicated, and has had several bugs and vulnerabilities (#96, #208, #252). Unlike most SmallVec methods, it does not correspond to a standard Vec method. Perhaps because of this, it is rarely used. Should we deprecate this method, and remove it in the next major version?
The standard Vec::splice method could be used in place of insert_many, but SmallVec does not yet implement this method. We could add this, possibly by copying the implementation from std::vec, if there is demand for it.
The text was updated successfully, but these errors were encountered:
@mbrubeck I would like to put in a request for a Vec::splice equivalent API.
I've implemented a crate that exposes several types that would be appropriate to implement Ruby's Array class. This crate has multiple backends, including Vec and SmallVec. Ruby has an Array#[]= API which in one of its forms acts like Vec::splice: replace a subslice of the Array with another slice.
The SmallVec implementation is several times larger and scarier than the Vec implementation.
The
insert_many
function is complicated, and has had several bugs and vulnerabilities (#96, #208, #252). Unlike mostSmallVec
methods, it does not correspond to a standardVec
method. Perhaps because of this, it is rarely used. Should we deprecate this method, and remove it in the next major version?The standard
Vec::splice
method could be used in place ofinsert_many
, butSmallVec
does not yet implement this method. We could add this, possibly by copying the implementation fromstd::vec
, if there is demand for it.The text was updated successfully, but these errors were encountered: