File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -139,13 +139,9 @@ fn bench_instance(c: &mut Criterion) {
139
139
let medium_gas: InstanceOptions = InstanceOptions {
140
140
gas_limit : MEDIUM_GAS_LIMIT ,
141
141
} ;
142
- let mut instance = Instance :: from_code (
143
- CYBERPUNK ,
144
- backend,
145
- medium_gas. clone ( ) ,
146
- Some ( DEFAULT_MEMORY_LIMIT ) ,
147
- )
148
- . unwrap ( ) ;
142
+ let mut instance =
143
+ Instance :: from_code ( CYBERPUNK , backend, medium_gas, Some ( DEFAULT_MEMORY_LIMIT ) )
144
+ . unwrap ( ) ;
149
145
150
146
let info = mock_info ( "creator" , & coins ( 1000 , "earth" ) ) ;
151
147
let contract_result =
@@ -156,14 +152,13 @@ fn bench_instance(c: &mut Criterion) {
156
152
b. iter_batched (
157
153
|| {
158
154
// setup new instance for each iteration because cpu loop will consume all gas
159
- let instance = Instance :: from_code (
155
+ Instance :: from_code (
160
156
CYBERPUNK ,
161
157
mock_backend ( & [ ] ) ,
162
- medium_gas. clone ( ) ,
158
+ medium_gas,
163
159
Some ( DEFAULT_MEMORY_LIMIT ) ,
164
160
)
165
- . unwrap ( ) ;
166
- instance
161
+ . unwrap ( )
167
162
} ,
168
163
|mut instance| {
169
164
let gas_before = instance. get_gas_left ( ) ;
You can’t perform that action at this time.
0 commit comments