Enable clippy's uninlined_format_args linter (#7204)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Justin Traglia
2024-03-18 18:29:19 -05:00
committed by GitHub
parent 5b94dbb697
commit b7ef60b899
31 changed files with 84 additions and 104 deletions

View File

@@ -244,7 +244,7 @@ mod tests {
reth.logs.log_file_directory.join(reth.chain.chain.to_string());
let log_dir = reth.logs.log_file_directory;
let end = format!("reth/logs/{}", SUPPORTED_CHAINS[0]);
assert!(log_dir.as_ref().ends_with(end), "{:?}", log_dir);
assert!(log_dir.as_ref().ends_with(end), "{log_dir:?}");
let mut iter = SUPPORTED_CHAINS.iter();
iter.next();
@@ -253,8 +253,8 @@ mod tests {
reth.logs.log_file_directory =
reth.logs.log_file_directory.join(reth.chain.chain.to_string());
let log_dir = reth.logs.log_file_directory;
let end = format!("reth/logs/{}", chain);
assert!(log_dir.as_ref().ends_with(end), "{:?}", log_dir);
let end = format!("reth/logs/{chain}");
assert!(log_dir.as_ref().ends_with(end), "{log_dir:?}");
}
}

View File

@@ -85,7 +85,7 @@ impl Command {
match content {
Some(content) => {
if raw {
println!("{:?}", content);
println!("{content:?}");
} else {
match segment {
StaticFileSegment::Headers => {
@@ -157,7 +157,7 @@ impl<DB: Database> TableViewer<()> for GetValueViewer<'_, DB> {
match content {
Some(content) => {
println!("{}", content);
println!("{content}");
}
None => {
error!(target: "reth::cli", "No content for the given table key.");

View File

@@ -221,7 +221,7 @@ impl ImportCommand {
/// Loads the reth config
fn load_config(&self, config_path: PathBuf) -> eyre::Result<Config> {
confy::load_path::<Config>(config_path.clone())
.wrap_err_with(|| format!("Could not load config file {:?}", config_path))
.wrap_err_with(|| format!("Could not load config file {config_path:?}"))
}
}