Skip to content

Commit

Permalink
Fix Rust cosmetic pass removing trailing units
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kM committed Jan 8, 2025
1 parent e111ce5 commit e80c30f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OptimizeMiniRust.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ let remove_trailing_unit = object
let e1 = super#visit_expr () e1 in
let e2 = super#visit_expr () e2 in
match e2 with
| Unit -> e1
| Unit when b.typ = Unit -> e1
| _ -> Let (b, e1, e2)
end

Expand Down

0 comments on commit e80c30f

Please sign in to comment.