diff options
author | Paul Masurel <paul.masurel@gmail.com> | 2017-05-11 14:30:00 +0900 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2017-05-11 19:37:15 +0900 |
commit | 477b9136b9df5c4b364ea947796db8f47cc7ad53 (patch) | |
tree | 88db952aa69b4ea204b10457beb149680cbfee31 /src/common/mod.rs | |
parent | 7852d097b8822be9792a58305878d8458560350e (diff) |
FIXED inconsistent Term's field serialization.
Also.
Cleaned up the code to make sure that the logic
is only in one place.
Removed allocate_vec
Closes #141
Closes #139
Closes #142
Closes #138
Diffstat (limited to 'src/common/mod.rs')
-rw-r--r-- | src/common/mod.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/common/mod.rs b/src/common/mod.rs index bc31b18..ae9f567 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -27,20 +27,6 @@ pub trait HasLen { } } - -/// Creates an uninitialized Vec of a given usize -/// -/// `allocate_vec` does an unsafe call to `set_len` -/// as other solution are extremely slow in debug mode. -pub fn allocate_vec<T>(capacity: usize) -> Vec<T> { - let mut v = Vec::with_capacity(capacity); - unsafe { - v.set_len(capacity); - } - v -} - - const HIGHEST_BIT: u64 = 1 << 63; |