mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Fix clippy
This commit is contained in:
parent
3a6225c354
commit
9b9b6d39f3
6 changed files with 10 additions and 11 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -457,6 +457,7 @@ fn fmt_pattern_only(
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn pattern_fmt_apply(
|
||||
buf: &mut Buf<'_>,
|
||||
func: Pattern<'_>,
|
||||
|
|
|
@ -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>>,
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue