kbct
kbct copied to clipboard
Compilation warning
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