about summary refs log tree commit diff
path: root/src/libarena
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-09 17:15:45 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-11-13 02:02:44 +1100
commitd1eb68e8d7d2883c70304021d5443c96bca18abb (patch)
treefcbd0118799d497f3b4eeac80dc8881532261447 /src/libarena
parent9fe94bd995ab13afab7078a708b01f365740d2cd (diff)
Create UnsignedInt trait and deprecate free functions
Diffstat (limited to 'src/libarena')
-rw-r--r--src/libarena/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 3e93430eb69..fb091ec7f84 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -38,7 +38,7 @@ use std::cmp;
 use std::intrinsics::{TyDesc, get_tydesc};
 use std::intrinsics;
 use std::mem;
-use std::num;
+use std::num::UnsignedInt;
 use std::ptr;
 use std::rc::Rc;
 use std::rt::heap::{allocate, deallocate};
@@ -187,7 +187,7 @@ impl Arena {
         self.chunks.borrow_mut().push(self.copy_head.borrow().clone());
 
         *self.copy_head.borrow_mut() =
-            chunk(num::next_power_of_two(new_min_chunk_size + 1u), true);
+            chunk((new_min_chunk_size + 1u).next_power_of_two(), true);
 
         return self.alloc_copy_inner(n_bytes, align);
     }
@@ -228,7 +228,7 @@ impl Arena {
         self.chunks.borrow_mut().push(self.head.borrow().clone());
 
         *self.head.borrow_mut() =
-            chunk(num::next_power_of_two(new_min_chunk_size + 1u), false);
+            chunk((new_min_chunk_size + 1u).next_power_of_two(), false);
 
         return self.alloc_noncopy_inner(n_bytes, align);
     }