From c715d659cd210786fae963497a9af4c05d09d31e Mon Sep 17 00:00:00 2001 From: Kisaragi Marine Date: Wed, 18 Oct 2023 23:16:25 +0900 Subject: [PATCH 1/3] chore: remove unnecessary lint from #[allow] --- package/origlang-compiler/src/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/origlang-compiler/src/lexer.rs b/package/origlang-compiler/src/lexer.rs index e454f85e..db443014 100644 --- a/package/origlang-compiler/src/lexer.rs +++ b/package/origlang-compiler/src/lexer.rs @@ -88,7 +88,7 @@ impl Lexer { } } - #[allow(clippy::too_many_lines, clippy::unnecessary_wraps)] + #[allow(clippy::unnecessary_wraps)] fn next_inner(&self) -> Result { macro_rules! fold { ($e:expr, $t:expr, $f:expr) => { From 269fa1a1838e91825ef3f9a6e1083f3aaf557985 Mon Sep 17 00:00:00 2001 From: Kisaragi Marine Date: Wed, 18 Oct 2023 23:18:35 +0900 Subject: [PATCH 2/3] chore: allow noisy lints --- package/origlang-ir-optimizer/src/ir1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/origlang-ir-optimizer/src/ir1.rs b/package/origlang-ir-optimizer/src/ir1.rs index cdd552d7..f5b3cac2 100644 --- a/package/origlang-ir-optimizer/src/ir1.rs +++ b/package/origlang-ir-optimizer/src/ir1.rs @@ -89,7 +89,7 @@ impl FoldBinaryOperatorInvocationWithConstant { }).collect() } - #[allow(clippy::cast_lossless)] + #[allow(clippy::cast_lossless, clippy::too_many_lines)] #[deny(clippy::as_underscore)] #[must_use] fn walk_expression(expr: TypedExpression) -> TypedExpression { @@ -206,6 +206,7 @@ impl FoldBinaryOperatorInvocationWithConstant { } } + #[allow(clippy::redundant_closure_call)] fn fold_compare_into_bool_literal(lhs: &TypedIntLiteral, rhs: &TypedIntLiteral, compare: BinaryOperatorKind) -> TypedExpression { // [T, O] =>> (T, T) => O macro_rules! poly_input_lambda { From fca9a3a8ed5bc9c385723601ccbc8e18dd280804 Mon Sep 17 00:00:00 2001 From: Kisaragi Marine Date: Wed, 18 Oct 2023 23:18:48 +0900 Subject: [PATCH 3/3] refactor: remove unnecessary ref --- package/origlang-ir-optimizer/src/ir1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/origlang-ir-optimizer/src/ir1.rs b/package/origlang-ir-optimizer/src/ir1.rs index f5b3cac2..ab33754c 100644 --- a/package/origlang-ir-optimizer/src/ir1.rs +++ b/package/origlang-ir-optimizer/src/ir1.rs @@ -32,7 +32,7 @@ gen_cast_from!(Ordering, i64); impl> OutputCompareResultAsSelf for T { fn compare_self(&self, other: &Self) -> Option { - self.partial_cmp(&other).map(T::cast_from) + self.partial_cmp(other).map(T::cast_from) } }