@@ -32,7 +32,7 @@ impl<T> TypedArena<T> {
3232}
3333
3434#[ test]
35- pub fn test_unused ( ) {
35+ fn test_unused ( ) {
3636 let arena: TypedArena < Point > = TypedArena :: default ( ) ;
3737 assert ! ( arena. chunks. borrow( ) . is_empty( ) ) ;
3838}
@@ -75,7 +75,7 @@ fn test_arena_alloc_nested() {
7575}
7676
7777#[ test]
78- pub fn test_copy ( ) {
78+ fn test_copy ( ) {
7979 let arena = TypedArena :: default ( ) ;
8080 #[ cfg( not( miri) ) ]
8181 const N : usize = 100000 ;
@@ -87,13 +87,13 @@ pub fn test_copy() {
8787}
8888
8989#[ bench]
90- pub fn bench_copy ( b : & mut Bencher ) {
90+ fn bench_copy ( b : & mut Bencher ) {
9191 let arena = TypedArena :: default ( ) ;
9292 b. iter ( || arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) )
9393}
9494
9595#[ bench]
96- pub fn bench_copy_nonarena ( b : & mut Bencher ) {
96+ fn bench_copy_nonarena ( b : & mut Bencher ) {
9797 b. iter ( || {
9898 let _: Box < _ > = Box :: new ( Point { x : 1 , y : 2 , z : 3 } ) ;
9999 } )
@@ -106,7 +106,7 @@ struct Noncopy {
106106}
107107
108108#[ test]
109- pub fn test_noncopy ( ) {
109+ fn test_noncopy ( ) {
110110 let arena = TypedArena :: default ( ) ;
111111 #[ cfg( not( miri) ) ]
112112 const N : usize = 100000 ;
@@ -118,7 +118,7 @@ pub fn test_noncopy() {
118118}
119119
120120#[ test]
121- pub fn test_typed_arena_zero_sized ( ) {
121+ fn test_typed_arena_zero_sized ( ) {
122122 let arena = TypedArena :: default ( ) ;
123123 #[ cfg( not( miri) ) ]
124124 const N : usize = 100000 ;
@@ -130,7 +130,7 @@ pub fn test_typed_arena_zero_sized() {
130130}
131131
132132#[ test]
133- pub fn test_typed_arena_clear ( ) {
133+ fn test_typed_arena_clear ( ) {
134134 let mut arena = TypedArena :: default ( ) ;
135135 for _ in 0 ..10 {
136136 arena. clear ( ) ;
@@ -145,7 +145,7 @@ pub fn test_typed_arena_clear() {
145145}
146146
147147#[ bench]
148- pub fn bench_typed_arena_clear ( b : & mut Bencher ) {
148+ fn bench_typed_arena_clear ( b : & mut Bencher ) {
149149 let mut arena = TypedArena :: default ( ) ;
150150 b. iter ( || {
151151 arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) ;
@@ -154,7 +154,7 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
154154}
155155
156156#[ bench]
157- pub fn bench_typed_arena_clear_100 ( b : & mut Bencher ) {
157+ fn bench_typed_arena_clear_100 ( b : & mut Bencher ) {
158158 let mut arena = TypedArena :: default ( ) ;
159159 b. iter ( || {
160160 for _ in 0 ..100 {
@@ -230,15 +230,15 @@ fn test_typed_arena_drop_small_count() {
230230}
231231
232232#[ bench]
233- pub fn bench_noncopy ( b : & mut Bencher ) {
233+ fn bench_noncopy ( b : & mut Bencher ) {
234234 let arena = TypedArena :: default ( ) ;
235235 b. iter ( || {
236236 arena. alloc ( Noncopy { string : "hello world" . to_string ( ) , array : vec ! [ 1 , 2 , 3 , 4 , 5 ] } )
237237 } )
238238}
239239
240240#[ bench]
241- pub fn bench_noncopy_nonarena ( b : & mut Bencher ) {
241+ fn bench_noncopy_nonarena ( b : & mut Bencher ) {
242242 b. iter ( || {
243243 let _: Box < _ > =
244244 Box :: new ( Noncopy { string : "hello world" . to_string ( ) , array : vec ! [ 1 , 2 , 3 , 4 , 5 ] } ) ;
0 commit comments