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:
committed by
Benjamin Bouvier
parent
7dfd159fd8
commit
ec9700c70b
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user