From ba79cfe39f3c6004f1a0466954e3f22c3002e0d5 Mon Sep 17 00:00:00 2001 From: lyken Date: Fri, 26 Jul 2024 15:38:23 +0800 Subject: [PATCH] core: allow clippy changes --- nac3core/src/codegen/expr.rs | 2 +- nac3core/src/codegen/irrt/error_context.rs | 1 + nac3core/src/codegen/model/function_builder.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 2648a44c..1324761a 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -619,7 +619,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> { let exn_id = self.resolver.get_string_id(name); let exn_id = exn_id_model.constant(self.ctx, exn_id as u64); - self.raise_exn_impl(generator, exn_id, msg, params, loc) + self.raise_exn_impl(generator, exn_id, msg, params, loc); } pub fn make_assert( diff --git a/nac3core/src/codegen/irrt/error_context.rs b/nac3core/src/codegen/irrt/error_context.rs index f15ecac8..dad74246 100644 --- a/nac3core/src/codegen/irrt/error_context.rs +++ b/nac3core/src/codegen/irrt/error_context.rs @@ -7,6 +7,7 @@ use super::util::get_sized_dependent_function_name; /// It is always [`Int32`]. type ErrorId = Int32; +#[allow(clippy::struct_field_names)] pub struct ErrorIdsFields { pub index_error: Field>, pub value_error: Field>, diff --git a/nac3core/src/codegen/model/function_builder.rs b/nac3core/src/codegen/model/function_builder.rs index 6f9aafb9..91dd7275 100644 --- a/nac3core/src/codegen/model/function_builder.rs +++ b/nac3core/src/codegen/model/function_builder.rs @@ -19,6 +19,7 @@ impl<'ctx, 'a> FunctionBuilder<'ctx, 'a> { // NOTE: `_name` is for self-documentation #[must_use] + #[allow(clippy::needless_pass_by_value)] pub fn arg>(mut self, _name: &'static str, arg: Instance<'ctx, M>) -> Self { self.arguments.push(( arg.model.get_type(self.ctx.ctx).as_basic_type_enum().into(),