@@ -30,7 +30,7 @@ impl<T> TypedArena<T> {
30
30
}
31
31
32
32
#[ test]
33
- pub fn test_unused ( ) {
33
+ fn test_unused ( ) {
34
34
let arena: TypedArena < Point > = TypedArena :: default ( ) ;
35
35
assert ! ( arena. chunks. borrow( ) . is_empty( ) ) ;
36
36
}
@@ -73,7 +73,7 @@ fn test_arena_alloc_nested() {
73
73
}
74
74
75
75
#[ test]
76
- pub fn test_copy ( ) {
76
+ fn test_copy ( ) {
77
77
let arena = TypedArena :: default ( ) ;
78
78
#[ cfg( not( miri) ) ]
79
79
const N : usize = 100000 ;
@@ -85,13 +85,13 @@ pub fn test_copy() {
85
85
}
86
86
87
87
#[ bench]
88
- pub fn bench_copy ( b : & mut Bencher ) {
88
+ fn bench_copy ( b : & mut Bencher ) {
89
89
let arena = TypedArena :: default ( ) ;
90
90
b. iter ( || arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) )
91
91
}
92
92
93
93
#[ bench]
94
- pub fn bench_copy_nonarena ( b : & mut Bencher ) {
94
+ fn bench_copy_nonarena ( b : & mut Bencher ) {
95
95
b. iter ( || {
96
96
let _: Box < _ > = Box :: new ( Point { x : 1 , y : 2 , z : 3 } ) ;
97
97
} )
@@ -104,7 +104,7 @@ struct Noncopy {
104
104
}
105
105
106
106
#[ test]
107
- pub fn test_noncopy ( ) {
107
+ fn test_noncopy ( ) {
108
108
let arena = TypedArena :: default ( ) ;
109
109
#[ cfg( not( miri) ) ]
110
110
const N : usize = 100000 ;
@@ -116,7 +116,7 @@ pub fn test_noncopy() {
116
116
}
117
117
118
118
#[ test]
119
- pub fn test_typed_arena_zero_sized ( ) {
119
+ fn test_typed_arena_zero_sized ( ) {
120
120
let arena = TypedArena :: default ( ) ;
121
121
#[ cfg( not( miri) ) ]
122
122
const N : usize = 100000 ;
@@ -128,7 +128,7 @@ pub fn test_typed_arena_zero_sized() {
128
128
}
129
129
130
130
#[ test]
131
- pub fn test_typed_arena_clear ( ) {
131
+ fn test_typed_arena_clear ( ) {
132
132
let mut arena = TypedArena :: default ( ) ;
133
133
for _ in 0 ..10 {
134
134
arena. clear ( ) ;
@@ -143,7 +143,7 @@ pub fn test_typed_arena_clear() {
143
143
}
144
144
145
145
#[ bench]
146
- pub fn bench_typed_arena_clear ( b : & mut Bencher ) {
146
+ fn bench_typed_arena_clear ( b : & mut Bencher ) {
147
147
let mut arena = TypedArena :: default ( ) ;
148
148
b. iter ( || {
149
149
arena. alloc ( Point { x : 1 , y : 2 , z : 3 } ) ;
@@ -152,7 +152,7 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
152
152
}
153
153
154
154
#[ bench]
155
- pub fn bench_typed_arena_clear_100 ( b : & mut Bencher ) {
155
+ fn bench_typed_arena_clear_100 ( b : & mut Bencher ) {
156
156
let mut arena = TypedArena :: default ( ) ;
157
157
b. iter ( || {
158
158
for _ in 0 ..100 {
@@ -228,15 +228,15 @@ fn test_typed_arena_drop_small_count() {
228
228
}
229
229
230
230
#[ bench]
231
- pub fn bench_noncopy ( b : & mut Bencher ) {
231
+ fn bench_noncopy ( b : & mut Bencher ) {
232
232
let arena = TypedArena :: default ( ) ;
233
233
b. iter ( || {
234
234
arena. alloc ( Noncopy { string : "hello world" . to_string ( ) , array : vec ! [ 1 , 2 , 3 , 4 , 5 ] } )
235
235
} )
236
236
}
237
237
238
238
#[ bench]
239
- pub fn bench_noncopy_nonarena ( b : & mut Bencher ) {
239
+ fn bench_noncopy_nonarena ( b : & mut Bencher ) {
240
240
b. iter ( || {
241
241
let _: Box < _ > =
242
242
Box :: new ( Noncopy { string : "hello world" . to_string ( ) , array : vec ! [ 1 , 2 , 3 , 4 , 5 ] } ) ;
0 commit comments