diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index 15a1dfc0da..ea3c6c6525 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -95,7 +95,7 @@ pub fn parse_import_section<'data>( Global { ty: type_to_type(ty.content_type).unwrap(), mutability: ty.mutable, - initializer: GlobalInit::Import(), + initializer: GlobalInit::Import, }, module_name, field_name, @@ -253,7 +253,7 @@ pub fn parse_element_section<'data>( .initializer { GlobalInit::I32Const(value) => (None, value as u32 as usize), - GlobalInit::Import() => (Some(GlobalIndex::new(global_index as usize)), 0), + GlobalInit::Import => (Some(GlobalIndex::new(global_index as usize)), 0), _ => panic!("should not happen"), }, ref s => panic!("unsupported init expr in element section: {:?}", s), @@ -301,7 +301,7 @@ pub fn parse_data_section<'data>( .initializer { GlobalInit::I32Const(value) => (None, value as u32 as usize), - GlobalInit::Import() => (Some(GlobalIndex::new(global_index as usize)), 0), + GlobalInit::Import => (Some(GlobalIndex::new(global_index as usize)), 0), _ => panic!("should not happen"), }, ref s => panic!("unsupported init expr in data section: {:?}", s), diff --git a/lib/wasm/src/translation_utils.rs b/lib/wasm/src/translation_utils.rs index 02e03cb386..899523f17a 100644 --- a/lib/wasm/src/translation_utils.rs +++ b/lib/wasm/src/translation_utils.rs @@ -73,7 +73,7 @@ pub enum GlobalInit { /// A `get_global` of another global. GlobalRef(GlobalIndex), ///< The global is imported from, and thus initialized by, a different module. - Import(), + Import, } /// WebAssembly table.