Change this API to return an Option that's None when it's unimplemented and Some(Result<...>) when it is.

This commit is contained in:
Nick Lewycky
2020-08-07 14:26:53 -07:00
parent dac6bd9d01
commit 037922bbf2
3 changed files with 7 additions and 6 deletions

View File

@ -210,15 +210,15 @@ impl Compiler for LLVMCompiler {
symbol_registry: &dyn SymbolRegistry,
// The metadata to inject into the wasmer_metadata section of the object file.
wasmer_metadata: &[u8],
) -> Result<Option<Vec<u8>>, CompileError> {
Ok(Some(self.compile_native_object(
) -> Option<Result<Vec<u8>, CompileError>> {
Some(self.compile_native_object(
target,
module,
module_translation,
function_body_inputs,
symbol_registry,
wasmer_metadata,
)?))
))
}
/// Compile the module using LLVM, producing a compilation result with