From 582c404e074bcf2e7585ab40dc0d1405774904d0 Mon Sep 17 00:00:00 2001 From: crystalin <alan@moonsonglabs.com> Date: Thu, 28 Sep 2023 18:45:18 +0200 Subject: [PATCH] fmt --- substrate/client/executor/src/wasm_runtime.rs | 11 +++++------ substrate/client/service/src/builder.rs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/substrate/client/executor/src/wasm_runtime.rs b/substrate/client/executor/src/wasm_runtime.rs index 8a85f9eb58e..22f0146723c 100644 --- a/substrate/client/executor/src/wasm_runtime.rs +++ b/substrate/client/executor/src/wasm_runtime.rs @@ -321,14 +321,14 @@ where return Err(WasmError::Instantiation(format!( "--wasmtime-precompiled is not a directory: {}", wasmtime_precompiled_dir.display() - ))); + ))) } let handle_err = |e: std::io::Error| -> WasmError { return WasmError::Instantiation(format!( "Io error when loading wasmtime precompiled folder ({}): {}", wasmtime_precompiled_dir.display(), e - )); + )) }; let mut maybe_compiled_artifact = None; @@ -364,7 +364,7 @@ where return Err(WasmError::Instantiation( "wasmtime precompiled folder contain a file with invalid utf8 name" .to_owned(), - )); + )) } } @@ -424,7 +424,7 @@ pub fn precompile_and_serialize_versioned_wasm_runtime<'c>( wasmtime_precompiled_path: &Path, ) -> Result<(), WasmError> { let semantics = match wasm_method { - WasmExecutionMethod::Compiled { instantiation_strategy } => { + WasmExecutionMethod::Compiled { instantiation_strategy } => sc_executor_wasmtime::Semantics { heap_alloc_strategy, instantiation_strategy, @@ -435,8 +435,7 @@ pub fn precompile_and_serialize_versioned_wasm_runtime<'c>( wasm_bulk_memory: false, wasm_reference_types: false, wasm_simd: false, - } - }, + }, }; let code_hash = &runtime_code.hash; diff --git a/substrate/client/service/src/builder.rs b/substrate/client/service/src/builder.rs index ebaa2be16fb..31ce9755503 100644 --- a/substrate/client/service/src/builder.rs +++ b/substrate/client/service/src/builder.rs @@ -257,7 +257,7 @@ pub fn new_wasm_executor<H: HostFunctions>(config: &Configuration) -> WasmExecut if let Some(ref wasmtime_precompiled_path) = config.wasmtime_precompiled { wasm_builder = wasm_builder.with_wasmtime_precompiled_path(wasmtime_precompiled_path); } - + wasm_builder.build() } -- GitLab