Conversation
f676145 to
44eb023
Compare
|
I'm not sure we should make the exact same API decisions as the standard library here. Because of the standard library's special status, it can use specialization internally even with the stable toolchain. However, smallvec cannot do the same. We should expect (and recommend) that most users of this crate will not have the Therefore, I think we might want to continue offering optimized |
|
@mbrubeck I've added some |
|
Thanks. I will try to finish reviewing this soon. |
|
@mbrubeck Any update? |
mbrubeck
left a comment
There was a problem hiding this comment.
Sorry for the delay, and thanks again for this work!
This ports most of the specialization work done for the
VecRust type to this library. With that theextend,from, andextend_from_sliceare now specialized, with specialization triggering in more instances. This also extends to other functions such asfrom_elemandclone_fromwhich were not specialized before.This also adds some missing trait implementations and functions with trait bounds.
All of this should finish one of the items in #183. Note that
extend_from_slicehas not been removed, sinceVecalso has this function. Instead, its trait bound was relaxed from
CopytoClonefor a matching signature.