Skip to content

Commit d27b25c

Browse files
committed
Fix clippy lints
1 parent bffd254 commit d27b25c

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

packages/vm/benches/main.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,9 @@ fn bench_instance(c: &mut Criterion) {
139139
let medium_gas: InstanceOptions = InstanceOptions {
140140
gas_limit: MEDIUM_GAS_LIMIT,
141141
};
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();
149145

150146
let info = mock_info("creator", &coins(1000, "earth"));
151147
let contract_result =
@@ -156,14 +152,13 @@ fn bench_instance(c: &mut Criterion) {
156152
b.iter_batched(
157153
|| {
158154
// setup new instance for each iteration because cpu loop will consume all gas
159-
let instance = Instance::from_code(
155+
Instance::from_code(
160156
CYBERPUNK,
161157
mock_backend(&[]),
162-
medium_gas.clone(),
158+
medium_gas,
163159
Some(DEFAULT_MEMORY_LIMIT),
164160
)
165-
.unwrap();
166-
instance
161+
.unwrap()
167162
},
168163
|mut instance| {
169164
let gas_before = instance.get_gas_left();

0 commit comments

Comments
 (0)