diff --git a/nac3core/src/codegen/builtin_fns.rs b/nac3core/src/codegen/builtin_fns.rs index f9137789e..63078107b 100644 --- a/nac3core/src/codegen/builtin_fns.rs +++ b/nac3core/src/codegen/builtin_fns.rs @@ -793,8 +793,8 @@ pub fn call_max<'ctx>( } } -/// Invokes the np_max, np_min, np_argmax, np_argmin functions -/// * `fn_name`: Can be one of "np_argmin", "np_argmax", "np_max", "np_min" +/// Invokes the `np_max`, `np_min`, `np_argmax`, `np_argmin` functions +/// * `fn_name`: Can be one of `"np_argmin"`, `"np_argmax"`, `"np_max"`, `"np_min"` pub fn call_numpy_max_min<'ctx, G: CodeGenerator + ?Sized>( generator: &mut G, ctx: &mut CodeGenContext<'ctx, '_>, @@ -844,7 +844,7 @@ pub fn call_numpy_max_min<'ctx, G: CodeGenerator + ?Sized>( generator, n_sz_eqz, "0:ValueError", - format!("zero-size array to reduction operation {}", fn_name).as_str(), + format!("zero-size array to reduction operation {fn_name}").as_str(), [None, None, None], ctx.current_loc, ); diff --git a/nac3core/src/toplevel/builtins.rs b/nac3core/src/toplevel/builtins.rs index ab639ed1a..bcb3c433d 100644 --- a/nac3core/src/toplevel/builtins.rs +++ b/nac3core/src/toplevel/builtins.rs @@ -1592,7 +1592,7 @@ impl<'a> BuiltinBuilder<'a> { let a_ty = fun.0.args[0].ty; let a = args[0].1.clone().to_basic_value_enum(ctx, generator, a_ty)?; - Ok(Some(builtin_fns::call_numpy_max_min(generator, ctx, (a_ty, a), &prim.name())?)) + Ok(Some(builtin_fns::call_numpy_max_min(generator, ctx, (a_ty, a), prim.name())?)) }), ) }