From b941469366b35c79264655be925e89238438d4ba Mon Sep 17 00:00:00 2001 From: NikVolf Date: Tue, 11 Apr 2017 13:06:24 +0300 Subject: [PATCH] fix sections order --- src/builder/module.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/builder/module.rs b/src/builder/module.rs index 8a7701b..857e948 100644 --- a/src/builder/module.rs +++ b/src/builder/module.rs @@ -62,14 +62,14 @@ impl From for elements::Module { if types.types().len() > 0 { 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; if import.entries().len() > 0 { 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); elements::Module::new(sections) }