tikv / rust-prometheus

Prometheus instrumentation library for Rust applications
Apache License 2.0
1.07k stars 182 forks source link

desc: fix format string for panic #391

Closed lucab closed 3 years ago

lucab commented 3 years ago

This fixes a compile error on current beta toolchain, which started enforcing that panic messages must be string literals (with format specifiers).

lucab commented 3 years ago

Full error is:

error: panic message is not a string literal
   --> src/desc.rs:260:33
    |
260 |                 other => panic!(other),
    |                                 ^^^^^
    |
    = note: `-D non-fmt-panic` implied by `-D warnings`
lucab commented 3 years ago

/cc @mxinden @breeswish