Skip to content

Commit

Permalink
Remove redundant use of tuple in case
Browse files Browse the repository at this point in the history
  • Loading branch information
Pi-Cla authored Apr 13, 2024
1 parent 5ff4732 commit 77255dd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions runner/src/exercism_test_runner/internal.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,20 @@ pub fn print_error(error: Error, path: String, test_name: String) -> String {
case error {
Unequal(left, right) -> {
let #(left_colored, right_colored) = case
#(dynamic.bool(left), dynamic.bool(right))
dynamic.bool(left),
dynamic.bool(right)
{
#(Ok(left_bool), Ok(right_bool)) -> #(
Ok(left_bool), Ok(right_bool) -> #(
left_bool
|> string.inspect()
|> ansi.green()
|> ansi.bold(),
|> string.inspect()
|> ansi.green()
|> ansi.bold(),
right_bool
|> string.inspect()
|> ansi.red()
|> ansi.bold(),
|> string.inspect()
|> ansi.red()
|> ansi.bold(),
)
_ -> {
_, _ -> {
let diff =
gap.to_styled(gap.compare_strings(
string.inspect(left),
Expand Down

0 comments on commit 77255dd

Please sign in to comment.