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
This commit is contained in:
parent
1fdd1d250c
commit
b749c02eb5
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue