Don't return a Result for ObjectBuilder::new

Since it always returned an `Ok(Self)`, there was no reason to have a
Result.
This commit is contained in:
Joshua Nelson
2020-02-16 11:41:04 -05:00
committed by Benjamin Bouvier
parent 7dfd159fd8
commit ec9700c70b

View File

@@ -54,14 +54,14 @@ impl ObjectBuilder {
name: String,
collect_traps: ObjectTrapCollection,
libcall_names: Box<dyn Fn(ir::LibCall) -> String>,
) -> ModuleResult<Self> {
Ok(Self {
) -> Self {
Self {
isa,
name,
collect_traps,
libcall_names,
function_alignment: 1,
})
}
}
/// Set the alignment used for functions.