kbct icon indicating copy to clipboard operation
kbct copied to clipboard

Compilation warning

Open felagund opened this issue 2 years ago • 0 comments

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

felagund avatar Jan 02 '22 19:01 felagund