core: reduce code duplication in codegen/builtin_fns #422
@ -1108,13 +1108,13 @@ where
|
|||||||
pub fn call_abs<'ctx, G: CodeGenerator + ?Sized>(
|
pub fn call_abs<'ctx, G: CodeGenerator + ?Sized>(
|
||||||
generator: &mut G,
|
generator: &mut G,
|
||||||
ctx: &mut CodeGenContext<'ctx, '_>,
|
ctx: &mut CodeGenContext<'ctx, '_>,
|
||||||
arg: (Type, BasicValueEnum<'ctx>),
|
n: (Type, BasicValueEnum<'ctx>),
|
||||||
|
|||||||
) -> Result<BasicValueEnum<'ctx>, String> {
|
) -> Result<BasicValueEnum<'ctx>, String> {
|
||||||
const FN_NAME: &str = "abs";
|
const FN_NAME: &str = "abs";
|
||||||
derppening marked this conversation as resolved
Outdated
derppening
commented
Is this change from Is this change from `const` to `let` necessary?
|
|||||||
helper_call_numpy_unary_elementwise(
|
helper_call_numpy_unary_elementwise(
|
||||||
generator,
|
generator,
|
||||||
ctx,
|
ctx,
|
||||||
arg,
|
n,
|
||||||
FN_NAME,
|
FN_NAME,
|
||||||
&|_ctx, elem_ty| elem_ty,
|
&|_ctx, elem_ty| elem_ty,
|
||||||
&|_generator, ctx, val_ty, val| match val {
|
&|_generator, ctx, val_ty, val| match val {
|
||||||
|
Loading…
Reference in New Issue
Block a user
Nit: Please keep this parameter as
n
. I don't think this change is necessary.