Format files.

This commit is contained in:
Maddy
2018-08-03 15:17:52 +00:00
committed by Dan Gohman
parent ee9e5cba49
commit 32b332b733
4 changed files with 13 additions and 9 deletions

View File

@@ -13,8 +13,8 @@ use environ::{ModuleEnvironment, WasmError, WasmResult};
use std::str::from_utf8;
use std::vec::Vec;
use translation_utils::{
type_to_type, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex,
SignatureIndex, Table, TableElementType, TableIndex,
type_to_type, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex, SignatureIndex,
Table, TableElementType, TableIndex,
};
use wasmparser;
use wasmparser::{
@@ -383,8 +383,10 @@ pub fn parse_elements_section(
};
match *parser.read() {
ParserState::ElementSectionEntryBody(ref elements) => {
let elems: Vec<FuncIndex> =
elements.iter().map(|&x| FuncIndex::new(x as usize)).collect();
let elems: Vec<FuncIndex> = elements
.iter()
.map(|&x| FuncIndex::new(x as usize))
.collect();
environ.declare_table_elements(table_index, base, offset, elems)
}
ParserState::Error(e) => return Err(WasmError::from_binary_reader_error(e)),