about summary refs log tree commit diff
path: root/src/libarena
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-03 07:59:04 +0000
committerbors <bors@rust-lang.org>2015-02-03 07:59:04 +0000
commit336c8d2e9c6b276b162bdb3edd43706372e6eddd (patch)
treece8b369728b285ce16ea77a7e43d8e9ce05b1be5 /src/libarena
parent7858cb432d3f2efc0374424cb2b51518f697c172 (diff)
parent8f4844d58b0a84792e85a650c510270559b81022 (diff)
downloadrust-336c8d2e9c6b276b162bdb3edd43706372e6eddd.tar.gz
rust-336c8d2e9c6b276b162bdb3edd43706372e6eddd.zip
Auto merge of #21613 - alfie:suffix-small, r=alexcrichton
Diffstat (limited to 'src/libarena')
-rw-r--r--src/libarena/lib.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 0ff6cf7b79a..62d103ae06a 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -101,7 +101,7 @@ pub struct Arena {
 impl Arena {
     /// Allocates a new Arena with 32 bytes preallocated.
     pub fn new() -> Arena {
-        Arena::new_with_size(32u)
+        Arena::new_with_size(32)
     }
 
     /// Allocates a new Arena with `initial_size` bytes preallocated.
@@ -117,7 +117,7 @@ impl Arena {
 fn chunk(size: uint, is_copy: bool) -> Chunk {
     Chunk {
         data: Rc::new(RefCell::new(Vec::with_capacity(size))),
-        fill: Cell::new(0u),
+        fill: Cell::new(0),
         is_copy: Cell::new(is_copy),
     }
 }
@@ -193,7 +193,7 @@ impl Arena {
         self.chunks.borrow_mut().push(self.copy_head.borrow().clone());
 
         *self.copy_head.borrow_mut() =
-            chunk((new_min_chunk_size + 1u).next_power_of_two(), true);
+            chunk((new_min_chunk_size + 1).next_power_of_two(), true);
 
         return self.alloc_copy_inner(n_bytes, align);
     }
@@ -234,7 +234,7 @@ impl Arena {
         self.chunks.borrow_mut().push(self.head.borrow().clone());
 
         *self.head.borrow_mut() =
-            chunk((new_min_chunk_size + 1u).next_power_of_two(), false);
+            chunk((new_min_chunk_size + 1).next_power_of_two(), false);
 
         return self.alloc_noncopy_inner(n_bytes, align);
     }
@@ -308,7 +308,7 @@ impl Arena {
 #[test]
 fn test_arena_destructors() {
     let arena = Arena::new();
-    for i in 0u..10 {
+    for i in 0..10 {
         // Arena allocate something with drop glue to make sure it
         // doesn't leak.
         arena.alloc(|| Rc::new(i));
@@ -337,7 +337,7 @@ fn test_arena_alloc_nested() {
 fn test_arena_destructors_fail() {
     let arena = Arena::new();
     // Put some stuff in the arena.
-    for i in 0u..10 {
+    for i in 0..10 {
         // Arena allocate something with drop glue to make sure it
         // doesn't leak.
         arena.alloc(|| { Rc::new(i) });
@@ -527,7 +527,7 @@ mod tests {
     #[test]
     pub fn test_copy() {
         let arena = TypedArena::new();
-        for _ in 0u..100000 {
+        for _ in 0..100000 {
             arena.alloc(Point {
                 x: 1,
                 y: 2,
@@ -582,7 +582,7 @@ mod tests {
     #[test]
     pub fn test_noncopy() {
         let arena = TypedArena::new();
-        for _ in 0u..100000 {
+        for _ in 0..100000 {
             arena.alloc(Noncopy {
                 string: "hello world".to_string(),
                 array: vec!( 1, 2, 3, 4, 5 ),