]> git.lizzy.rs Git - rust.git/commit
Add a mechanism to convert from Vec<T> to ~[T]
authorKevin Ballard <kevin@sb.org>
Wed, 7 May 2014 03:14:54 +0000 (20:14 -0700)
committerKevin Ballard <kevin@sb.org>
Thu, 8 May 2014 19:08:00 +0000 (12:08 -0700)
commit300d865fa4642f0a76b2676539efa3155ceaeddf
tree77cec48f95a8981067477672f40a0d5d7ff1731c
parentdbbb847bf033003c89e105e337419649dae5384c
Add a mechanism to convert from Vec<T> to ~[T]

Add a new trait FromVec with one self-less method from_vec(). This is
kind of like FromIterator, but it consumes a Vec<T>. It's only
implemented for ~[T], but the idea is post-DST it can be implemented for
any Boxed<[T]>.
src/libstd/vec.rs