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

Compilation warning #16

Open
felagund opened this issue Jan 2, 2022 · 0 comments
Open

Compilation warning #16

felagund opened this issue Jan 2, 2022 · 0 comments

Comments

@felagund
Copy link
Contributor

felagund commented Jan 2, 2022

On Kubuntu 21.10, I got this warning when compiling:

warning: panic message is not a string literal
   --> src/util/util.rs:101:15
    |
101 |         _ => panic!(format!("Illegal argument {}", val)),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(non_fmt_panic)]` on by default
    = note: this is no longer accepted in Rust 2021
    = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
help: remove the `format!(..)` macro call
    |
101 |         _ => panic!("Illegal argument {}", val),
    |                    --                        --

warning: 1 warning emitted
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

No branches or pull requests

1 participant