You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: `format!` in `format!` args
--> dbnexus-db/src/clickhouse.rs:1269:23
|
1269 | let mut sql = format!(
| _______________________^
1270 | | "ALTER TABLE {}{} UPDATE ",
1271 | | if let Some(schema) = schema {
1272 | | format!("{}.", self.quote(schema),)
... |
1276 | | format!("{}", self.quote(table_name))
1277 | | );
| |_________^
|
= help: combine the `format!(..)` arguments with the outer `format!(..)` call
= help: or consider changing `format!` to `format_args!`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#format_in_format_args
Is there a way to disable this linter.
I tried to modify some code But I end with some lifetime issue
is there a way to disable it.
rigth now I am not very consider about performance
Using format_args is already suspicious and I wouldn't call that "normal code" (i.e. I've never used format_args! directly). Also you don't really gain anything from putting the if let+formatting inside of the format! macro. I'd argue this just makes the code more complicated to read.
So I would do one of two things:
If you don't care about (minor) perf optimizations, pull the if let in front of the formatting
If you just want to disable it, you can put #[allow(clippy::format_in_format_args)] before the let mut sql = assignment: Playground. This applies to all lints.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Is there a way to disable this linter.
I tried to modify some code But I end with some lifetime issue
is there a way to disable it.
rigth now I am not very consider about performance
All reactions