diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-05-03 16:11:30 -0700 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-05-08 12:06:21 -0700 |
| commit | 4af84313d67e3062e43c0123093278b1887cac64 (patch) | |
| tree | 87a8c1ff9b99216fde88627e8519f1f7be5b382d /src/rustllvm/RustWrapper.cpp | |
| parent | bf1e065371f8e50f84318b45fb21a949faa9449f (diff) | |
| download | rust-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
