Make Module compilation safe

This commit is contained in:
Syrus
2020-04-22 16:21:43 -07:00
parent 5beba41fbb
commit c13e5478df

View File

@@ -136,7 +136,7 @@ impl Module {
store.engine().validate(binary)
}
unsafe fn compile(store: &Store, binary: &[u8]) -> Result<Self, CompileError> {
fn compile(store: &Store, binary: &[u8]) -> Result<Self, CompileError> {
let compiled = store.engine().compile(binary)?;
Ok(Self::from_compiled_module(store, compiled))
}