about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2014-05-03 16:11:30 -0700
committerKevin Ballard <kevin@sb.org>2014-05-08 12:06:21 -0700
commit4af84313d67e3062e43c0123093278b1887cac64 (patch)
tree87a8c1ff9b99216fde88627e8519f1f7be5b382d /src/rustllvm/RustWrapper.cpp
parentbf1e065371f8e50f84318b45fb21a949faa9449f (diff)
downloadrust-4af84313d67e3062e43c0123093278b1887cac64.tar.gz
rust-4af84313d67e3062e43c0123093278b1887cac64.zip
Rewrite &[T].to_owned() to allocate directly
This used to create a Vec<T> and then call .move_iter().collect() to
convert to a ~[T]. We can't do that anymore, so construct the ~[T] in
place instead. This has the added benefit of avoiding an unnecessary
memory copy (from the Vec<T> to the ~[T]).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions