]> git.lizzy.rs Git - rust.git/commit
std::io::mem: add a with_capacity constructor to MemWriter.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sat, 30 Nov 2013 13:58:27 +0000 (00:58 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Sat, 30 Nov 2013 13:58:27 +0000 (00:58 +1100)
commitbe6ae6eb373551936fffe83ebe085e4819ab00c0
tree263b5667c7a3f2252c9e09d716855301a84ebddb
parent80991bb578329ca921fdc910d9b6b064e8f521d2
std::io::mem: add a with_capacity constructor to MemWriter.

This allows one to reduce the number of reallocs of the internal buffer
if one has an approximate idea of the size of the final output.
src/libstd/io/mem.rs