Fix clippy

This commit is contained in:
Anthony Bullard 2025-01-08 15:37:03 -06:00
parent 3a6225c354
commit 9b9b6d39f3
No known key found for this signature in database
6 changed files with 10 additions and 11 deletions

View file

@ -133,7 +133,7 @@ fn new_op_call_expr<'a>(
let mut desugared_args = Vec::with_capacity_in(loc_args.len() + 1, env.arena);
desugared_args.push(desugar_expr(env, scope, left));
for loc_arg in &loc_args.items[..] {
for loc_arg in loc_args.items {
desugared_args.push(desugar_expr(env, scope, loc_arg));
}

View file

@ -761,6 +761,7 @@ pub struct WhenBranch {
pub redundant: RedundantMark,
}
#[allow(clippy::too_many_arguments)]
fn canonicalize_expr_apply<'a>(
env: &mut Env<'a>,
var_store: &mut VarStore,
@ -801,16 +802,14 @@ fn canonicalize_expr_apply<'a>(
let (type_arguments, lambda_set_variables, specialized_def_type) =
freshen_opaque_def(var_store, opaque_def);
let opaque_ref = OpaqueRef {
OpaqueRef {
opaque_var: var_store.fresh(),
name,
argument,
specialized_def_type: Box::new(specialized_def_type),
type_arguments,
lambda_set_variables,
};
opaque_ref
}
}
}
}
@ -854,7 +853,7 @@ fn canonicalize_expr_apply<'a>(
// Default: We're not tail-calling a symbol (by name), we're tail-calling a function value.
output.tail_calls = vec![];
let expr = match fn_expr.value {
match fn_expr.value {
Var(symbol, _) => {
output.references.insert_call(symbol);
@ -918,9 +917,7 @@ fn canonicalize_expr_apply<'a>(
application_style,
)
}
};
expr
}
}
}

View file

@ -97,7 +97,7 @@ fn format_expr_only(
},
loc_args,
) => {
fmt_apply(&loc_expr, loc_args.items, indent, buf);
fmt_apply(loc_expr, loc_args.items, indent, buf);
}
Expr::PncApply(loc_expr, loc_args) => {
fmt_pnc_apply(loc_expr, loc_args, indent, buf);

View file

@ -457,6 +457,7 @@ fn fmt_pattern_only(
}
}
#[allow(clippy::too_many_arguments)]
pub fn pattern_fmt_apply(
buf: &mut Buf<'_>,
func: Pattern<'_>,

View file

@ -233,6 +233,7 @@ fn loc_term<'a>() -> impl Parser<'a, Loc<Expr<'a>>, EExpr<'a>> {
),
zero_or_more(pnc_args()),
),
#[allow(clippy::type_complexity)]
|arena,
(expr, arg_locs_with_suffixes_vec): (
Loc<Expr<'a>>,

View file

@ -348,7 +348,7 @@ fn loc_ident_pattern_help<'a>(
byte(b')', EPattern::ParenEnd),
Pattern::SpaceBefore,
)),
|args| ArgType::PncArgs(args),
ArgType::PncArgs,
);
let whitespace_args =