Fmt and clippy

This commit is contained in:
ayazhafiz 2022-02-19 20:54:21 -05:00
parent 3c10ad2a9f
commit a38f1d1e8d
5 changed files with 6 additions and 4 deletions

View File

@ -329,9 +329,9 @@ pub fn to_type2<'a>(
annotation: &roc_parse::ast::TypeAnnotation<'a>,
region: Region,
) -> Type2 {
use roc_parse::ast::TypeHeader;
use roc_parse::ast::Pattern;
use roc_parse::ast::TypeAnnotation::*;
use roc_parse::ast::TypeHeader;
match annotation {
Apply(module_name, ident, targs) => {

View File

@ -3,7 +3,7 @@ use crate::scope::Scope;
use roc_collections::all::{ImMap, MutMap, MutSet, SendMap};
use roc_module::ident::{Ident, Lowercase, TagName};
use roc_module::symbol::{IdentIds, ModuleId, Symbol};
use roc_parse::ast::{TypeHeader, AssignedField, Pattern, Tag, TypeAnnotation};
use roc_parse::ast::{AssignedField, Pattern, Tag, TypeAnnotation, TypeHeader};
use roc_region::all::{Loc, Region};
use roc_types::subs::{VarStore, Variable};
use roc_types::types::{Alias, LambdaSet, Problem, RecordField, Type};

View File

@ -3,7 +3,7 @@ use crate::{
spaces::{fmt_comments_only, fmt_spaces, NewlineAt, INDENT},
Buf,
};
use roc_parse::ast::{TypeHeader, AssignedField, Collection, Expr, Tag, TypeAnnotation};
use roc_parse::ast::{AssignedField, Collection, Expr, Tag, TypeAnnotation, TypeHeader};
use roc_parse::ident::UppercaseIdent;
use roc_region::all::Loc;

View File

@ -739,6 +739,7 @@ fn append_expect_definition<'a>(
defs.push(arena.alloc(loc_def));
}
#[allow(clippy::too_many_arguments)]
fn append_type_definition<'a>(
arena: &'a Bump,
defs: &mut Vec<'a, &'a Loc<Def<'a>>>,
@ -941,6 +942,7 @@ enum TypeKind {
Opaque,
}
#[allow(clippy::too_many_arguments)]
fn finish_parsing_alias_or_opaque<'a>(
min_indent: u32,
options: ExprParseOptions,

View File

@ -1,4 +1,4 @@
use crate::ast::{TypeHeader, AssignedField, Pattern, Tag, TypeAnnotation};
use crate::ast::{AssignedField, Pattern, Tag, TypeAnnotation, TypeHeader};
use crate::blankspace::{space0_around_ee, space0_before_e, space0_e};
use crate::keyword;
use crate::parser::{