]> git.lizzy.rs Git - rust.git/commit
vec: Use less code bloat specialized Vec::from_iter
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Sun, 13 Nov 2016 00:09:27 +0000 (01:09 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Sun, 13 Nov 2016 00:30:42 +0000 (01:30 +0100)
commitc36edc726156c7868c6845c0e39b5231e35bc1ff
tree9adb88f4b0f0bc06c5f88a6ddd9b9fac41b47f50
parent2b3a37bd2e35458b4d66f13c4d3ad924455ac2bb
vec: Use less code bloat specialized Vec::from_iter

Vec::from_iter's general case allocates the vector up front;
this is redundant for the TrustedLen case, and can then be avoided
to reduce the size of the code.
src/libcollections/vec.rs