mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-29 06:32:17 +00:00
fix sections order
This commit is contained in:
@ -62,14 +62,14 @@ impl From<ModuleScaffold> for elements::Module {
|
|||||||
if types.types().len() > 0 {
|
if types.types().len() > 0 {
|
||||||
sections.push(elements::Section::Type(types));
|
sections.push(elements::Section::Type(types));
|
||||||
}
|
}
|
||||||
let functions = module.functions;
|
|
||||||
if functions.entries().len() > 0 {
|
|
||||||
sections.push(elements::Section::Function(functions));
|
|
||||||
}
|
|
||||||
let import = module.import;
|
let import = module.import;
|
||||||
if import.entries().len() > 0 {
|
if import.entries().len() > 0 {
|
||||||
sections.push(elements::Section::Import(import));
|
sections.push(elements::Section::Import(import));
|
||||||
}
|
}
|
||||||
|
let functions = module.functions;
|
||||||
|
if functions.entries().len() > 0 {
|
||||||
|
sections.push(elements::Section::Function(functions));
|
||||||
|
}
|
||||||
sections.extend(module.other);
|
sections.extend(module.other);
|
||||||
elements::Module::new(sections)
|
elements::Module::new(sections)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user