mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
clippy
This commit is contained in:
parent
13c589af7d
commit
153308dbf1
5 changed files with 24 additions and 31 deletions
|
@ -69,7 +69,7 @@ pub fn module_name<'a>() -> impl Parser<'a, ModuleName<'a>> {
|
|||
return Err(unexpected(0, state, Attempting::Module));
|
||||
};
|
||||
|
||||
let mut buf = String::with_capacity_in(1, arena);
|
||||
let mut buf = String::with_capacity_in(4, arena);
|
||||
|
||||
buf.push(first_letter);
|
||||
|
||||
|
@ -84,9 +84,9 @@ pub fn module_name<'a>() -> impl Parser<'a, ModuleName<'a>> {
|
|||
// * ASCII digits - e.g. `1` but not `¾`, both of which pass .is_numeric()
|
||||
// * A '.' separating module parts
|
||||
if ch.is_alphabetic() || ch.is_ascii_digit() {
|
||||
buf.push(ch);
|
||||
|
||||
state = state.advance_without_indenting(bytes_parsed)?;
|
||||
|
||||
buf.push(ch);
|
||||
} else if ch == '.' {
|
||||
match peek_utf8_char_at(&state, 1) {
|
||||
Ok((next, next_bytes_parsed)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue