Formatted files

This commit is contained in:
Syrus Akbary
2018-11-28 13:25:56 -08:00
parent 02477b6e5e
commit 80ddc759a1
9 changed files with 83 additions and 73 deletions

View File

@ -516,20 +516,18 @@ impl Instance {
let free_export = module.info.exports.get("_free");
if malloc_export.is_none() || free_export.is_none() {
None
}
else {
} else {
let malloc_index = if let Some(Export::Function(malloc_index)) = malloc_export {
malloc_index
}
else {
} else {
panic!("Expected malloc function")
};
let malloc_addr = get_function_addr(&malloc_index, &import_functions, &functions);
let malloc_addr =
get_function_addr(&malloc_index, &import_functions, &functions);
let free_index = if let Some(Export::Function(free_index)) = free_export {
free_index
}
else {
} else {
panic!("Expected free export function")
};
let free_addr = get_function_addr(&free_index, &import_functions, &functions);