Skip to content

Commit

Permalink
Move if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 20, 2024
1 parent dafbdc5 commit 7d309e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ pub(crate) fn native_literals(
// Skip implicit concatenated strings.
if literal_expr.is_implicit_concatenated() {
return;
} else {
literal_expr
}
literal_expr
} else if let Expr::UnaryOp(ast::ExprUnaryOp {
op: UnaryOp::UAdd | UnaryOp::USub,
operand,
Expand All @@ -217,6 +216,7 @@ pub(crate) fn native_literals(
{
literal_expr
} else {
// Only allow unary operators for numbers.
return;
}
} else {
Expand Down

0 comments on commit 7d309e7

Please sign in to comment.