mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
clippy
This commit is contained in:
parent
d8d0b6ebb1
commit
44c630037e
1 changed files with 6 additions and 8 deletions
|
@ -61,7 +61,7 @@ pub fn lowercase_ident<'a>() -> impl Parser<'a, &'a str, ()> {
|
|||
move |_, state: State<'a>, _min_indent: u32| match chomp_lowercase_part(state.bytes()) {
|
||||
Err(progress) => Err((progress, ())),
|
||||
Ok(ident) => {
|
||||
if !is_allowed_identifier(&ident) {
|
||||
if !is_allowed_identifier(ident) {
|
||||
Err((NoProgress, ()))
|
||||
} else {
|
||||
let width = ident.len();
|
||||
|
@ -88,7 +88,7 @@ pub fn lowercase_ident_keyword_e<'a>() -> impl Parser<'a, &'a str, ()> {
|
|||
move |_, state: State<'a>, _min_indent: u32| match chomp_lowercase_part(state.bytes()) {
|
||||
Err(progress) => Err((progress, ())),
|
||||
Ok(ident) => {
|
||||
if !is_allowed_identifier(&ident) {
|
||||
if !is_allowed_identifier(ident) {
|
||||
Err((MadeProgress, ()))
|
||||
} else {
|
||||
let width = ident.len();
|
||||
|
@ -138,7 +138,7 @@ pub fn unqualified_ident<'a>() -> impl Parser<'a, &'a str, ()> {
|
|||
move |_, state: State<'a>, _min_indent: u32| match chomp_anycase_part(state.bytes()) {
|
||||
Err(progress) => Err((progress, ())),
|
||||
Ok(ident) => {
|
||||
if !is_allowed_identifier(&ident) {
|
||||
if !is_allowed_identifier(ident) {
|
||||
Err((MadeProgress, ()))
|
||||
} else {
|
||||
let width = ident.len();
|
||||
|
@ -166,11 +166,9 @@ pub fn parse_ident<'a>(
|
|||
let state = advance_state!(state, width as usize)?;
|
||||
if let Ident::Access { module_name, parts } = ident {
|
||||
if module_name.is_empty() {
|
||||
if let Some(first) = parts.first() {
|
||||
if let Accessor::RecordField(ident) = first {
|
||||
if !is_allowed_identifier(ident) {
|
||||
return Err((NoProgress, EExpr::Start(initial.pos())));
|
||||
}
|
||||
if let Some(Accessor::RecordField(ident)) = parts.first() {
|
||||
if !is_allowed_identifier(ident) {
|
||||
return Err((NoProgress, EExpr::Start(initial.pos())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue