rm unnecessary .replace

This commit is contained in:
DaniPopes 2022-12-30 09:17:55 +01:00
parent d71fd4701f
commit c87226f520
No known key found for this signature in database
GPG Key ID: 0F09640DDB7AC692
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ fn crate_names_from_metadata(manifest_dir: PathBuf) -> Option<CrateNames> {
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::<EthersCrate>() {
if let Ok(current_pkg) = pkg.name.parse::<EthersCrate>() {
// replace `current_pkg`'s name with "crate"
let names = EthersCrate::path_names()
.map(