diff --git a/optd-core/src/dsl/analyzer/mod.rs b/optd-core/src/dsl/analyzer/mod.rs index 26f160d..515416e 100644 --- a/optd-core/src/dsl/analyzer/mod.rs +++ b/optd-core/src/dsl/analyzer/mod.rs @@ -1 +1 @@ -pub mod semantic; \ No newline at end of file +pub mod semantic; diff --git a/optd-core/src/dsl/analyzer/semantic.rs b/optd-core/src/dsl/analyzer/semantic.rs index f237cb2..d3a1834 100644 --- a/optd-core/src/dsl/analyzer/semantic.rs +++ b/optd-core/src/dsl/analyzer/semantic.rs @@ -255,4 +255,4 @@ impl SemanticAnalyzer { Ok(()) } } -*/ \ No newline at end of file +*/ diff --git a/optd-core/src/dsl/parser/expr.rs b/optd-core/src/dsl/parser/expr.rs index 4c85766..e15907d 100644 --- a/optd-core/src/dsl/parser/expr.rs +++ b/optd-core/src/dsl/parser/expr.rs @@ -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)