From c87226f520fc4cb40380f596b26608cb7a410200 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 30 Dec 2022 09:17:55 +0100 Subject: [PATCH] rm unnecessary .replace --- ethers-core/src/macros/ethers_crate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-core/src/macros/ethers_crate.rs b/ethers-core/src/macros/ethers_crate.rs index 1912ab65..2b8d4693 100644 --- a/ethers-core/src/macros/ethers_crate.rs +++ b/ethers-core/src/macros/ethers_crate.rs @@ -85,7 +85,7 @@ fn crate_names_from_metadata(manifest_dir: PathBuf) -> Option { let pkg = metadata.root_package()?; // return ethers_* if the root package is an EthersCrate (called in `ethers-rs/**/*`) - if let Ok(current_pkg) = pkg.name.replace('_', "-").parse::() { + if let Ok(current_pkg) = pkg.name.parse::() { // replace `current_pkg`'s name with "crate" let names = EthersCrate::path_names() .map(