rust/src/libstd
bors a990920c6f auto merge of #13963 : kballard/rust/remove_owned_vec_from_iterator, r=pcwalton
With `~[T]` no longer growable, the `FromIterator` impl for `~[T]` doesn't make
much sense. Not only that, but nearly everywhere it is used is to convert from
a `Vec<T>` into a `~[T]`, for the sake of maintaining existing APIs. This turns
out to be a performance loss, as it means every API that returns `~[T]`, even a
supposedly non-copying one, is in fact doing extra allocations and memcpy's.
Even `&[T].to_owned()` is going through `Vec<T>` first.

Remove the `FromIterator` impl for `~[T]`, and adjust all the APIs that relied
on it to start using `Vec<T>` instead. This includes rewriting
`&[T].to_owned()` to be more efficient, among other performance wins.

Also add a new mechanism to go from `Vec<T>` -> `~[T]`, just in case anyone
truly needs that, using the new trait `FromVec`.

[breaking-change]
2014-05-08 21:01:42 -07:00
..
comm Test fixes and rebase conflicts 2014-05-07 11:03:12 -07:00
fmt std: Extract format string parsing out of libstd 2014-05-08 09:35:59 -07:00
hash core: Inherit the result module 2014-05-07 08:16:14 -07:00
io Handle fallout in documentation 2014-05-08 12:06:22 -07:00
num Handle breakage after libcore split 2014-05-08 12:08:01 -07:00
path core: Inherit possible string functionality 2014-05-07 08:16:14 -07:00
rt Handle fallout in libnative 2014-05-08 12:06:22 -07:00
sync Handle fallout in iter, option, result, and sync::arc 2014-05-08 12:06:21 -07:00
unstable Handle fallout for vector addition 2014-05-08 12:06:22 -07:00
ascii.rs Handle breakage after libcore split 2014-05-08 12:08:01 -07:00
bitflags.rs Add (unsafe) coercion from bits to std::bitflags 2014-05-05 15:24:36 -07:00
c_str.rs rustdoc: Migrate from sundown to hoedown 2014-05-03 17:36:20 -07:00
c_vec.rs Register new snapshots 2014-04-08 00:03:11 -07:00
cleanup.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
from_str.rs core: Inherit the bool module 2014-05-07 08:14:56 -07:00
gc.rs core: Inhert ~/@/& cmp traits, remove old modules 2014-05-07 08:15:58 -07:00
lib.rs Handle more fallout 2014-05-08 12:06:22 -07:00
local_data.rs auto merge of #13835 : alexcrichton/rust/localdata, r=brson 2014-05-08 01:26:39 -07:00
macros.rs std: Modernize the local_data api 2014-05-07 23:43:39 -07:00
option.rs Test fixes and rebase conflicts 2014-05-07 11:03:12 -07:00
os.rs Handle fallout in os 2014-05-08 12:06:21 -07:00
prelude.rs core: Move Option::expect to libstd from libcore 2014-05-07 08:17:32 -07:00
rc.rs Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
reflect.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
repr.rs Test fixes and rebase conflicts 2014-05-07 11:03:12 -07:00
result.rs core: Add unwrap()/unwrap_err() methods to Result 2014-05-07 08:16:14 -07:00
rtdeps.rs Remove libc from std 2014-04-04 09:31:21 -07:00
slice.rs Move partition/partitioned/concat/connect tests back into slice 2014-05-08 12:08:01 -07:00
str.rs Handle breakage after libcore split 2014-05-08 12:08:01 -07:00
strbuf.rs Handle fallout in std::strbuf 2014-05-08 12:06:21 -07:00
task.rs core: Add unwrap()/unwrap_err() methods to Result 2014-05-07 08:16:14 -07:00
to_str.rs core: Inherit possible string functionality 2014-05-07 08:16:14 -07:00
unicode.rs core: Inherit necessary unicode functionality 2014-05-07 08:15:58 -07:00
vec.rs Move partition/partitioned/concat/connect tests back into slice 2014-05-08 12:08:01 -07:00