mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
clippy fixes
This commit is contained in:
parent
0471993428
commit
2bbcbbd5c1
1 changed files with 9 additions and 7 deletions
|
@ -688,6 +688,14 @@ fn loc_applied_args_e<'a>(
|
||||||
|
|
||||||
// Hash & Eq & ...
|
// Hash & Eq & ...
|
||||||
fn ability_chain<'a>() -> impl Parser<'a, Vec<'a, Loc<TypeAnnotation<'a>>>, EType<'a>> {
|
fn ability_chain<'a>() -> impl Parser<'a, Vec<'a, Loc<TypeAnnotation<'a>>>, EType<'a>> {
|
||||||
|
// Avoid clippy type complexity warning
|
||||||
|
type MyItems<'a> = Vec<
|
||||||
|
'a,
|
||||||
|
(
|
||||||
|
&'a [CommentOrNewline<'a>],
|
||||||
|
SpacesBefore<'a, Loc<TypeAnnotation<'a>>>,
|
||||||
|
),
|
||||||
|
>;
|
||||||
map_with_arena(
|
map_with_arena(
|
||||||
and(
|
and(
|
||||||
space0_before(
|
space0_before(
|
||||||
|
@ -708,13 +716,7 @@ fn ability_chain<'a>() -> impl Parser<'a, Vec<'a, Loc<TypeAnnotation<'a>>>, ETyp
|
||||||
|arena: &'a Bump,
|
|arena: &'a Bump,
|
||||||
(first_ability, other_abilities): (
|
(first_ability, other_abilities): (
|
||||||
SpacesBefore<'a, Loc<TypeAnnotation<'a>>>,
|
SpacesBefore<'a, Loc<TypeAnnotation<'a>>>,
|
||||||
Vec<
|
MyItems<'a>,
|
||||||
'a,
|
|
||||||
(
|
|
||||||
&'a [CommentOrNewline<'a>],
|
|
||||||
SpacesBefore<'a, Loc<TypeAnnotation<'a>>>,
|
|
||||||
),
|
|
||||||
>,
|
|
||||||
)| {
|
)| {
|
||||||
let mut res = Vec::with_capacity_in(other_abilities.len() + 1, arena);
|
let mut res = Vec::with_capacity_in(other_abilities.len() + 1, arena);
|
||||||
let mut pending = first_ability;
|
let mut pending = first_ability;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue