Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
AlSchlo committed Feb 11, 2025
1 parent 9b66b85 commit b45654d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion optd-core/src/dsl/analyzer/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub mod semantic;
pub mod semantic;
2 changes: 1 addition & 1 deletion optd-core/src/dsl/analyzer/semantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ impl SemanticAnalyzer {
Ok(())
}
}
*/
*/
6 changes: 1 addition & 5 deletions optd-core/src/dsl/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ fn parse_constructor(pair: Pair<'_, Rule>) -> Expr {

// Check if first character is lowercase
// TODO(alexis): small hack until I rewrite the grammar using Chumsky
if name
.chars()
.next()
.map_or(false, |c| c.is_ascii_lowercase())
{
if name.chars().next().is_some_and(|c| c.is_ascii_lowercase()) {
Expr::Call(Box::new(Expr::Var(name)), args)
} else {
Expr::Constructor(name, args)
Expand Down

0 comments on commit b45654d

Please sign in to comment.