File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -180,14 +180,8 @@ fn bench_cache(c: &mut Criterion) {
180
180
} ) ;
181
181
} ) ;
182
182
183
- let path_iter = glob:: glob ( "testdata/*.wasm" ) . unwrap ( ) . flat_map ( Result :: ok) ;
184
- for contract_path in path_iter {
185
- let contract_name = contract_path. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
186
- if !BENCH_CONTRACTS . contains ( & contract_name) {
187
- continue ;
188
- }
189
-
190
- let contract_wasm = fs:: read ( & contract_path) . unwrap ( ) ;
183
+ for contract_name in BENCH_CONTRACTS {
184
+ let contract_wasm = fs:: read ( format ! ( "testdata/{contract_name}" ) ) . unwrap ( ) ;
191
185
let cache: Cache < MockApi , MockStorage , MockQuerier > =
192
186
unsafe { Cache :: new ( options. clone ( ) ) . unwrap ( ) } ;
193
187
let checksum = cache. save_wasm ( & contract_wasm) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments