bytecodealliance / cranelift

Cranelift code generator
https://cranelift.readthedocs.io/
2.49k stars 202 forks source link

Don't return a Result for ObjectBuilder::new #1394

Closed jyn514 closed 4 years ago

jyn514 commented 4 years ago

Since it always returned an Ok(Self), there was no reason to have a Result.

This is a small change that makes cranelift easier to use. It does not affect runtime behavior. Note that this is not backwards compatible.

This returns Self from ObjectBuilder::new instead of returning Result. Since new() can never fail, there's no reason to use Result.

N/A

r? @philipc r? @bnjbvr