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

@@ -357,28 +357,28 @@ mod tests {
fn test_maybe_data_dir_path() {
let path = MaybePlatformPath::<DataDirPath>::default();
let path = path.unwrap_or_chain_default(Chain::mainnet());
assert!(path.as_ref().ends_with("reth/mainnet"), "{:?}", path);
assert!(path.as_ref().ends_with("reth/mainnet"), "{path:?}");
let db_path = path.db_path();
assert!(db_path.ends_with("reth/mainnet/db"), "{:?}", db_path);
assert!(db_path.ends_with("reth/mainnet/db"), "{db_path:?}");
let path = MaybePlatformPath::<DataDirPath>::from_str("my/path/to/datadir").unwrap();
let path = path.unwrap_or_chain_default(Chain::mainnet());
assert!(path.as_ref().ends_with("my/path/to/datadir"), "{:?}", path);
assert!(path.as_ref().ends_with("my/path/to/datadir"), "{path:?}");
}
#[test]
fn test_maybe_testnet_datadir_path() {
let path = MaybePlatformPath::<DataDirPath>::default();
let path = path.unwrap_or_chain_default(Chain::goerli());
assert!(path.as_ref().ends_with("reth/goerli"), "{:?}", path);
assert!(path.as_ref().ends_with("reth/goerli"), "{path:?}");
let path = MaybePlatformPath::<DataDirPath>::default();
let path = path.unwrap_or_chain_default(Chain::holesky());
assert!(path.as_ref().ends_with("reth/holesky"), "{:?}", path);
assert!(path.as_ref().ends_with("reth/holesky"), "{path:?}");
let path = MaybePlatformPath::<DataDirPath>::default();
let path = path.unwrap_or_chain_default(Chain::sepolia());
assert!(path.as_ref().ends_with("reth/sepolia"), "{:?}", path);
assert!(path.as_ref().ends_with("reth/sepolia"), "{path:?}");
}
}