mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-09 20:11:06 +00:00
compare with slice
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ pub fn pack_instance(raw_module: Vec<u8>, mut ctor_module: elements::Module) ->
|
||||
let &elements::Type::Function(ref func) = ctor_module.type_section().ok_or(Error::NoTypeSection)?
|
||||
.types().get(type_id as usize).ok_or(Error::MalformedModule)?;
|
||||
|
||||
if func.params().len() != 1 || func.params()[0] != elements::ValueType::I32 {
|
||||
if func.params() != &[elements::ValueType::I32] {
|
||||
return Err(Error::InvalidCreateSignature);
|
||||
}
|
||||
if func.return_type().is_some() {
|
||||
|
||||
Reference in New Issue
Block a user