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, name: String,
collect_traps: ObjectTrapCollection, collect_traps: ObjectTrapCollection,
libcall_names: Box<dyn Fn(ir::LibCall) -> String>, libcall_names: Box<dyn Fn(ir::LibCall) -> String>,
) -> ModuleResult<Self> { ) -> Self {
Ok(Self { Self {
isa, isa,
name, name,
collect_traps, collect_traps,
libcall_names, libcall_names,
function_alignment: 1, function_alignment: 1,
}) }
} }
/// Set the alignment used for functions. /// Set the alignment used for functions.