about summary refs log tree commit diff
path: root/src/rt/rust_util.h
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-08-22 22:12:56 -0700
committerBrian Anderson <banderson@mozilla.com>2013-08-23 14:46:23 -0700
commitb3fa43f6e0c94d39fc08846c53eac48e2903b97f (patch)
tree868c9a944ae3f2cffd03551e278b2d98e97082cc /src/rt/rust_util.h
parent74b2d9e19b2784aed009bd34aaeed43248944aca (diff)
downloadrust-b3fa43f6e0c94d39fc08846c53eac48e2903b97f.tar.gz
rust-b3fa43f6e0c94d39fc08846c53eac48e2903b97f.zip
rt: Remove rust_exchange_alloc
Diffstat (limited to 'src/rt/rust_util.h')
-rw-r--r--src/rt/rust_util.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/rt/rust_util.h b/src/rt/rust_util.h
index 7c531297ccd..acedbe31a6b 100644
--- a/src/rt/rust_util.h
+++ b/src/rt/rust_util.h
@@ -12,7 +12,6 @@
 #define RUST_UTIL_H
 
 #include <limits.h>
-#include "rust_exchange_alloc.h"
 #include "rust_type.h"
 
 extern struct type_desc str_body_tydesc;
@@ -57,16 +56,6 @@ vec_data(rust_vec *v) {
     return reinterpret_cast<T*>(v->data);
 }
 
-inline void reserve_vec_exact(rust_vec** vpp,
-                              size_t size) {
-    if (size > (*vpp)->alloc) {
-        rust_exchange_alloc exchange_alloc;
-        *vpp = (rust_vec*)exchange_alloc
-            .realloc(*vpp, size + sizeof(rust_vec));
-        (*vpp)->alloc = size;
-    }
-}
-
 typedef rust_vec rust_str;
 
 inline size_t get_box_size(size_t body_size, size_t body_align) {