@@ -500,7 +500,7 @@ mod tests {
500500
501501 #[ test]
502502 pub fn test_unused ( ) {
503- let arena: TypedArena < Point > = TypedArena :: new ( ) ;
503+ let arena: TypedArena < Point > = TypedArena :: default ( ) ;
504504 assert ! ( arena. chunks. borrow( ) . is_empty( ) ) ;
505505 }
506506
@@ -538,7 +538,7 @@ mod tests {
538538 }
539539 }
540540
541- let arena = Wrap ( TypedArena :: new ( ) ) ;
541+ let arena = Wrap ( TypedArena :: default ( ) ) ;
542542
543543 let result = arena. alloc_outer ( || Outer {
544544 inner : arena. alloc_inner ( || Inner { value : 10 } ) ,
@@ -549,15 +549,15 @@ mod tests {
549549
550550 #[ test]
551551 pub fn test_copy ( ) {
552- let arena = TypedArena :: new ( ) ;
552+ let arena = TypedArena :: default ( ) ;
553553 for _ in 0 ..100000 {
554554 arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) ;
555555 }
556556 }
557557
558558 #[ bench]
559559 pub fn bench_copy ( b : & mut Bencher ) {
560- let arena = TypedArena :: new ( ) ;
560+ let arena = TypedArena :: default ( ) ;
561561 b. iter ( || arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) )
562562 }
563563
@@ -576,7 +576,7 @@ mod tests {
576576
577577 #[ test]
578578 pub fn test_noncopy ( ) {
579- let arena = TypedArena :: new ( ) ;
579+ let arena = TypedArena :: default ( ) ;
580580 for _ in 0 ..100000 {
581581 arena. alloc ( Noncopy {
582582 string : "hello world" . to_string ( ) ,
@@ -587,15 +587,15 @@ mod tests {
587587
588588 #[ test]
589589 pub fn test_typed_arena_zero_sized ( ) {
590- let arena = TypedArena :: new ( ) ;
590+ let arena = TypedArena :: default ( ) ;
591591 for _ in 0 ..100000 {
592592 arena. alloc ( ( ) ) ;
593593 }
594594 }
595595
596596 #[ test]
597597 pub fn test_typed_arena_clear ( ) {
598- let mut arena = TypedArena :: new ( ) ;
598+ let mut arena = TypedArena :: default ( ) ;
599599 for _ in 0 ..10 {
600600 arena. clear ( ) ;
601601 for _ in 0 ..10000 {
@@ -620,7 +620,7 @@ mod tests {
620620 fn test_typed_arena_drop_count ( ) {
621621 let counter = Cell :: new ( 0 ) ;
622622 {
623- let arena: TypedArena < DropCounter > = TypedArena :: new ( ) ;
623+ let arena: TypedArena < DropCounter > = TypedArena :: default ( ) ;
624624 for _ in 0 ..100 {
625625 // Allocate something with drop glue to make sure it doesn't leak.
626626 arena. alloc ( DropCounter { count : & counter } ) ;
@@ -632,7 +632,7 @@ mod tests {
632632 #[ test]
633633 fn test_typed_arena_drop_on_clear ( ) {
634634 let counter = Cell :: new ( 0 ) ;
635- let mut arena: TypedArena < DropCounter > = TypedArena :: new ( ) ;
635+ let mut arena: TypedArena < DropCounter > = TypedArena :: default ( ) ;
636636 for i in 0 ..10 {
637637 for _ in 0 ..100 {
638638 // Allocate something with drop glue to make sure it doesn't leak.
@@ -659,7 +659,7 @@ mod tests {
659659 fn test_typed_arena_drop_small_count ( ) {
660660 DROP_COUNTER . with ( |c| c. set ( 0 ) ) ;
661661 {
662- let arena: TypedArena < SmallDroppable > = TypedArena :: new ( ) ;
662+ let arena: TypedArena < SmallDroppable > = TypedArena :: default ( ) ;
663663 for _ in 0 ..100 {
664664 // Allocate something with drop glue to make sure it doesn't leak.
665665 arena. alloc ( SmallDroppable ) ;
@@ -671,7 +671,7 @@ mod tests {
671671
672672 #[ bench]
673673 pub fn bench_noncopy ( b : & mut Bencher ) {
674- let arena = TypedArena :: new ( ) ;
674+ let arena = TypedArena :: default ( ) ;
675675 b. iter ( || {
676676 arena. alloc ( Noncopy {
677677 string : "hello world" . to_string ( ) ,
0 commit comments