@@ -39,7 +39,7 @@ criterion_main!(bench_get_or_intern, bench_resolve, bench_get, bench_iter);
39
39
40
40
fn bench_get_or_intern_static ( c : & mut Criterion ) {
41
41
let mut g = c. benchmark_group ( "get_or_intern_static" ) ;
42
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
42
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
43
43
#[ rustfmt:: skip]
44
44
let static_strings = & [
45
45
"a" , "b" , "c" , "d" , "e" , "f" , "g" , "h" , "i" , "j" , "k" , "l" , "m" ,
@@ -87,7 +87,7 @@ fn bench_get_or_intern_static(c: &mut Criterion) {
87
87
fn bench_get_or_intern_fill_with_capacity ( c : & mut Criterion ) {
88
88
let mut g = c. benchmark_group ( "get_or_intern/fill-empty/with_capacity" ) ;
89
89
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
90
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
90
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
91
91
g. bench_with_input (
92
92
BB :: NAME ,
93
93
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -113,7 +113,7 @@ fn bench_get_or_intern_fill_with_capacity(c: &mut Criterion) {
113
113
fn bench_get_or_intern_fill ( c : & mut Criterion ) {
114
114
let mut g = c. benchmark_group ( "get_or_intern/fill-empty/new" ) ;
115
115
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
116
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
116
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
117
117
g. bench_with_input (
118
118
BB :: NAME ,
119
119
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -139,7 +139,7 @@ fn bench_get_or_intern_fill(c: &mut Criterion) {
139
139
fn bench_get_or_intern_already_filled ( c : & mut Criterion ) {
140
140
let mut g = c. benchmark_group ( "get_or_intern/already-filled" ) ;
141
141
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
142
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
142
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
143
143
g. bench_with_input (
144
144
BB :: NAME ,
145
145
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -165,7 +165,7 @@ fn bench_get_or_intern_already_filled(c: &mut Criterion) {
165
165
fn bench_resolve_already_filled ( c : & mut Criterion ) {
166
166
let mut g = c. benchmark_group ( "resolve/already-filled" ) ;
167
167
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
168
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
168
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
169
169
g. bench_with_input (
170
170
BB :: NAME ,
171
171
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -191,7 +191,7 @@ fn bench_resolve_already_filled(c: &mut Criterion) {
191
191
fn bench_resolve_unchecked_already_filled ( c : & mut Criterion ) {
192
192
let mut g = c. benchmark_group ( "resolve_unchecked/already-filled" ) ;
193
193
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
194
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
194
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
195
195
g. bench_with_input (
196
196
BB :: NAME ,
197
197
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -220,7 +220,7 @@ fn bench_resolve_unchecked_already_filled(c: &mut Criterion) {
220
220
fn bench_get_already_filled ( c : & mut Criterion ) {
221
221
let mut g = c. benchmark_group ( "get/already-filled" ) ;
222
222
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
223
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > ) {
223
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > ) {
224
224
g. bench_with_input (
225
225
BB :: NAME ,
226
226
& ( BENCH_LEN_STRINGS , BENCH_STRING_LEN ) ,
@@ -246,11 +246,11 @@ fn bench_get_already_filled(c: &mut Criterion) {
246
246
fn bench_iter_already_filled ( c : & mut Criterion ) {
247
247
let mut g = c. benchmark_group ( "iter/already-filled" ) ;
248
248
g. throughput ( Throughput :: Elements ( BENCH_LEN_STRINGS as u64 ) ) ;
249
- fn bench_for_backend < BB : BackendBenchmark > ( g : & mut BenchmarkGroup < WallTime > )
249
+ fn bench_for_backend < ' i , BB : BackendBenchmark < ' i > > ( g : & mut BenchmarkGroup < WallTime > )
250
250
where
251
- for < ' a > & ' a <BB as BackendBenchmark >:: Backend : IntoIterator <
251
+ for < ' a > & ' a <BB as BackendBenchmark < ' i > >:: Backend : IntoIterator <
252
252
Item = (
253
- <<BB as BackendBenchmark > :: Backend as Backend >:: Symbol ,
253
+ <<BB as BackendBenchmark < ' i > > :: Backend as Backend < ' i > >:: Symbol ,
254
254
& ' a str ,
255
255
) ,
256
256
> ,
0 commit comments