Making vec::reserve reserve precisely the size given (untested)

This commit is contained in:
Kevin Cantu
2012-02-04 03:16:59 -08:00
committed by Brian Anderson
parent 9f0239ce9c
commit d3dfe8758d
2 changed files with 8 additions and 6 deletions

View File

@@ -102,7 +102,7 @@ extern "C" CDECL void
vec_reserve_shared(type_desc* ty, rust_vec** vp,
size_t n_elts) {
rust_task *task = rust_task_thread::get_task();
reserve_vec(task, vp, n_elts * ty->size);
reserve_vec_exact(task, vp, n_elts * ty->size);
}
/**