From ec4e476cc6aefe8a01544e0c216f5e0b8583e71d Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 4 Mar 2019 13:51:13 +0100 Subject: [PATCH 1/3] fix(runtime-core) Remove an unused import. This patch removes an unused import, namely `crate::sys::Memory`. --- lib/runtime-core/src/error.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/runtime-core/src/error.rs b/lib/runtime-core/src/error.rs index abc69cc5e..0e2ab6eb7 100644 --- a/lib/runtime-core/src/error.rs +++ b/lib/runtime-core/src/error.rs @@ -1,4 +1,3 @@ -use crate::sys::Memory; use crate::types::{ FuncSig, GlobalDescriptor, MemoryDescriptor, MemoryIndex, TableDescriptor, TableIndex, Type, }; From d9073c03c65a899647dee667ebcdd336a53288b9 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 4 Mar 2019 13:53:41 +0100 Subject: [PATCH 2/3] fix(runtime-core) `hasher` does not need to be mutable. This patch updates the `hasher` variable. It is declared as mutable, but it's never mutated. --- lib/runtime-core/src/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime-core/src/cache.rs b/lib/runtime-core/src/cache.rs index 339b78fcc..1cb804655 100644 --- a/lib/runtime-core/src/cache.rs +++ b/lib/runtime-core/src/cache.rs @@ -48,7 +48,7 @@ impl WasmHash { let mut state = blake2bp::State::new(); state.update(wasm); - let mut hasher = state.finalize(); + let hasher = state.finalize(); let generic_array = hasher.as_bytes(); first_part.copy_from_slice(&generic_array[0..32]); From 42c9bdf8c233a87ff5434d313fe917f142401e4f Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 4 Mar 2019 13:59:37 +0100 Subject: [PATCH 3/3] fix(clif-backend) Remove an unused variable declaration. The `compiled_functions` variable is declared twice. The first declaration is never used. This patch removes it. --- lib/clif-backend/src/resolver.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/clif-backend/src/resolver.rs b/lib/clif-backend/src/resolver.rs index 53b3a789a..dce331b58 100644 --- a/lib/clif-backend/src/resolver.rs +++ b/lib/clif-backend/src/resolver.rs @@ -94,7 +94,6 @@ impl FuncResolverBuilder { info: &ModuleInfo, ) -> CompileResult<(Self, HandlerData)> { let num_func_bodies = function_bodies.len(); - let mut compiled_functions: Vec<(Vec, RelocSink)> = Vec::with_capacity(num_func_bodies); let mut local_relocs = Map::with_capacity(num_func_bodies); let mut external_relocs = Map::with_capacity(num_func_bodies);