Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic to avoid warning message #1

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

apainintheneck
Copy link
Contributor

This avoids the following error message on gleam v1.2.1.

warning: Panic used as a function
  ┌─ /Users/kevinrobell/Desktop/other/Coding/Projects/persistent_regex/bench/build/packages/gleamy_bench/src/gleamy/bench.gleam:9:9
  │
9 │   panic("not implemented")
  │         ^^^^^^^^^^^^^^^^^

`panic` is not a function and will crash before it can do anything with
this argument.

Hint: if you want to display an error message you should write
`panic as "my error message"`
See: https://tour.gleam.run/advanced-features/panic/

The other changes are just because gleam format now sorts imports alphabetically.

This avoids the following error message on gleam v1.2.1.

```
warning: Panic used as a function
  ┌─ /Users/kevinrobell/Desktop/other/Coding/Projects/persistent_regex/bench/build/packages/gleamy_bench/src/gleamy/bench.gleam:9:9
  │
9 │   panic("not implemented")
  │         ^^^^^^^^^^^^^^^^^

`panic` is not a function and will crash before it can do anything with
this argument.

Hint: if you want to display an error message you should write
`panic as "my error message"`
See: https://tour.gleam.run/advanced-features/panic/
```

The other changes are just because `gleam format` now sorts imports alphabetically.
@schurhammer
Copy link
Owner

Thank you :)

@schurhammer schurhammer merged commit fb31909 into schurhammer:main Jul 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants