forked from M-Labs/nac3
1
0
Fork 0

core: cargo clippy

This commit is contained in:
lyken 2024-07-12 21:18:53 +08:00
parent 2dbc1ec659
commit 6c10e3d056
2 changed files with 4 additions and 4 deletions

View File

@ -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,
);

View File

@ -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())?))
}),
)
}