From 86218f47719f6104a7941f5d0f582fbe296186ff Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 14 May 2024 19:19:54 -0700 Subject: [PATCH] enable `uninlined_format_args` lint --- Cargo.toml | 1 + src/clap.rs | 2 +- src/service/rooms/timeline.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22e57bb5..b24397b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,7 @@ tests_outside_test_module = "warn" too_many_lines = "warn" try_err = "warn" undocumented_unsafe_blocks = "warn" +uninlined_format_args = "warn" unnecessary_safety_comment = "warn" unnecessary_safety_doc = "warn" unnecessary_self_imports = "warn" diff --git a/src/clap.rs b/src/clap.rs index e17c5106..f38d162a 100644 --- a/src/clap.rs +++ b/src/clap.rs @@ -11,7 +11,7 @@ fn version() -> String { let cargo_pkg_version = env!("CARGO_PKG_VERSION"); match option_env!("GRAPEVINE_VERSION_EXTRA") { - Some(x) => format!("{} ({})", cargo_pkg_version, x), + Some(x) => format!("{cargo_pkg_version} ({x})"), None => cargo_pkg_version.to_owned(), } } diff --git a/src/service/rooms/timeline.rs b/src/service/rooms/timeline.rs index 4dce9420..cb5f3332 100644 --- a/src/service/rooms/timeline.rs +++ b/src/service/rooms/timeline.rs @@ -822,7 +822,7 @@ impl Service { .filter(|v| v.starts_with('@')) .unwrap_or(sender.as_str()); let server_name = services().globals.server_name(); - let server_user = format!("@grapevine:{}", server_name); + let server_user = format!("@grapevine:{server_name}"); let content = serde_json::from_str::(pdu.content.get()) .map_err(|_| Error::bad_database("Invalid content in pdu."))?;