exercism / gleam

Exercism exercises in Gleam.
https://exercism.org/tracks/gleam
MIT License
86 stars 79 forks source link

Redundant tuple in exercise_test_runner #486

Closed 4rc0s closed 3 months ago

4rc0s commented 3 months ago

The v.1.2.0 compiler is reporting a redundant tuple wrapper here:

Compiling exercism_test_runner

warning: Redundant tuple
   ┌─ /exercism/gleam/log-levels/build/packages/exercism_test_runner/src/exercism_test_runner/internal.gleam:87:9
   │
87 │         #(dynamic.bool(left), dynamic.bool(right))
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can remove this tuple wrapper

Instead of building a tuple and matching on it, you can match on its
contents directly.
A case expression can take multiple subjects separated by commas like this:

    case one_subject, another_subject {
      _, _ -> todo
    }

See: https://tour.gleam.run/flow-control/multiple-subjects/
lpil commented 3 months ago

Thank you