Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rben01 committed Sep 28, 2024
1 parent 58778b3 commit 8455a41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions numbat/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl PrettyPrint for BinaryOperator {
fn pretty_print(&self) -> Markup {
use BinaryOperator::*;

let operator = match self {
let operator = m::operator(match self {
Add => "+",
Sub => "-",
Mul => "×",
Expand All @@ -51,11 +51,11 @@ impl PrettyPrint for BinaryOperator {
NotEqual => "≠",
LogicalAnd => "&&",
LogicalOr => "||",
};
});

match self {
Power => m::operator("^"),
_ => m::space() + m::operator(operator) + m::space(),
Power => operator,
_ => m::space() + operator + m::space(),
}
}
}
Expand Down

0 comments on commit 8455a41

Please sign in to comment.