Skip to content

Commit

Permalink
fix new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Sep 22, 2022
1 parent 6ecf78b commit 03a078e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion runtime/near-vm-runner/src/wasmtime_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl crate::runner::VM for WasmtimeVM {
Some(func) => match func.typed::<(), (), _>(&mut store) {
Ok(run) => match run.call(&mut store, ()) {
Ok(_) => VMResult::ok(logic),
Err(err) => (VMResult::abort(logic, err.into_vm_error())),
Err(err) => VMResult::abort(logic, err.into_vm_error()),
},
Err(err) => VMResult::abort(logic, err.into_vm_error()),
},
Expand Down
17 changes: 5 additions & 12 deletions runtime/runtime-params-estimator/src/function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,19 @@ fn make_many_methods_contract(method_count: i32) -> ContractCode {
for i in 0..method_count {
write!(
&mut methods,
"
(export \"hello{}\" (func {i}))
(func (;{i};)
r#"
(export "hello{i}" (func {i}))
(func
i32.const {i}
drop
return
)
",
i = i
"#,
)
.unwrap();
}

let code = format!(
"
(module
{}
)",
methods
);
let code = format!("(module {methods})");
ContractCode::new(wat::parse_str(code).unwrap(), None)
}

Expand Down

0 comments on commit 03a078e

Please sign in to comment.