Skip to content

Commit

Permalink
🥢 Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Philogy committed Oct 17, 2024
1 parent c24f69d commit 12edecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/ast/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::fmt;
pub(crate) fn lex(src: &str) -> Result<Vec<Spanned<Token>>, Vec<Rich<'_, Token<'_>>>> {
lexer().parse(src).into_result().map_err(|e| {
e.into_iter()
.map(|errs| errs.map_token(|c| Token::Error(c)))
.map(|errs| errs.map_token(Token::Error))
.collect::<Vec<_>>()
})
}
Expand Down
3 changes: 1 addition & 2 deletions crates/ast/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ pub fn parse(src: &str) -> Result<ast::Root<'_>, Vec<Rich<'_, Token<'_>>>> {
let ast = root()
.parse(tokens)
.into_result()
.map_err(|errs| errs.into_iter().map(|e| e.into_owned()).collect::<Vec<_>>())
.map_err(|e| e)?;
.map_err(|errs| errs.into_iter().map(|e| e.into_owned()).collect::<Vec<_>>())?;

Ok(ast)
}
Expand Down

0 comments on commit 12edecc

Please sign in to comment.