diff --git a/schala-lang/language/src/ast/operators.rs b/schala-lang/language/src/ast/operators.rs index d02b6c5..b55d423 100644 --- a/schala-lang/language/src/ast/operators.rs +++ b/schala-lang/language/src/ast/operators.rs @@ -17,12 +17,7 @@ impl PrefixOp { } pub fn is_prefix(op: &str) -> bool { - match op { - "+" => true, - "-" => true, - "!" => true, - _ => false - } + matches!(op, "+" | "-" | "!") } } @@ -54,7 +49,7 @@ impl BinOp { } } -fn token_kind_to_sigil<'a>(tok: &'a TokenKind) -> Option<&'a str> { +fn token_kind_to_sigil(tok: & TokenKind) -> Option<&str> { use self::TokenKind::*; Some(match tok { Operator(op) => op.as_str(),