Commit a77c0d1d53

a77c0d1d5351922d76f1647e31770e8ccb3c127a

parent: 0179bf3b79

Unregistered key

Austin Ray <austin@austinray.io> · 2021-04-04 23:03 UTC

fix: remove format!() in panic!()

Rust 1.51 expanded the `non_fmt_panic` lint to warn when using a
`format!()` in a `panic!()` as `panic!()` already uses `format!()`'s
syntax[0]. CI builds fail with stable due to this expansion. Removing
the `format!()` stops the warning and keeps the same behavior.

[0] https://doc.rust-lang.org/std/macro.panic.html

Layout: unified · split

src/server.rs +1 −1
@@ -421,7 +421,7 @@ impl Drop for MatrixServer {
421421 let option_name =
422422 &format!("{}.{}", self.server_name, option_name);
423423 section.free_option(option_name).unwrap_or_else(|_| {
424 panic!(format!("Can't free option {}", option_name))
424 panic!("Can't free option {}", option_name)
425425 });
426426 }
427427 }