From b749c02eb5944e5515ee6cfee20082da5ef586da Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 20 Feb 2025 22:11:15 -0500 Subject: [PATCH] Mark all format-like macros for Clippy See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args Ensure that usage of the macros with `format!`-like parameters will be validated by Clippy --- cli/generate/src/render.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/generate/src/render.rs b/cli/generate/src/render.rs index e369e2c9..85bb1360 100644 --- a/cli/generate/src/render.rs +++ b/cli/generate/src/render.rs @@ -26,6 +26,7 @@ const ABI_VERSION_WITH_RESERVED_WORDS: usize = 15; const BUILD_VERSION: &str = env!("CARGO_PKG_VERSION"); const BUILD_SHA: Option<&'static str> = option_env!("BUILD_SHA"); +#[clippy::format_args] macro_rules! add { ($this: tt, $($arg: tt)*) => {{ $this.buffer.write_fmt(format_args!($($arg)*)).unwrap(); @@ -40,6 +41,7 @@ macro_rules! add_whitespace { }}; } +#[clippy::format_args] macro_rules! add_line { ($this: tt, $($arg: tt)*) => { add_whitespace!($this);