some validation in packing

This commit is contained in:
NikVolf committed 2017-11-22 01:40:58 +03:00
1 parent a08b9e7dff
commit 89867d7ddb
2 files changed
+40 -7

No files matched your search

+1 -1
View File
@@ -115,7 +115,7 @@ fn main() {
if !matches.is_present("skip_optimization") {
wasm_utils::optimize(&mut ctor_module, vec![CREATE_SYMBOL]).expect("Optimizer to finish without errors");
}
let ctor_module = wasm_utils::pack_instance(raw_module, ctor_module);
let ctor_module = wasm_utils::pack_instance(raw_module, ctor_module).expect("Packing failed");
parity_wasm::serialize_to_file(&path, ctor_module).expect("Failed to serialize to file");
} else {
let mut file = fs::File::create(&path).expect("Failed to create file");