diff --git a/src/crate_metadata.rs b/src/crate_metadata.rs index 9b47b7d190f1e4e2461b757c7fe4c03ea5d053ab..9f081564b9fbe2b22d9d7ab43dd6142c37d6fb9e 100644 --- a/src/crate_metadata.rs +++ b/src/crate_metadata.rs @@ -46,14 +46,14 @@ impl CrateMetadata { let mut target_directory = metadata.target_directory.as_path().join("ink"); // Normalize the package and lib name. - let package_name = root_package.name.replace("-", "_"); + let package_name = root_package.name.replace('-', "_"); let lib_name = &root_package .targets .iter() .find(|target| target.kind.iter().any(|t| t == "cdylib")) .expect("lib name not found") .name - .replace("-", "_"); + .replace('-', "_"); let absolute_manifest_path = manifest_path.absolute_directory()?; let absolute_workspace_root = metadata.workspace_root.canonicalize()?; diff --git a/src/main.rs b/src/main.rs index beb5d09ec3483e187502482124a0a95f6a6fe771..98db48ebea605ca41fa5b288178ce4e45faf3b81 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,7 +139,7 @@ impl std::str::FromStr for OptimizationPasses { // We need to replace " here, since the input string could come // from either the CLI or the `Cargo.toml` profile section. // If it is from the profile it could e.g. be "3" or 3. - let normalized_input = input.replace("\"", "").to_lowercase(); + let normalized_input = input.replace('"', "").to_lowercase(); match normalized_input.as_str() { "0" => Ok(OptimizationPasses::Zero), "1" => Ok(OptimizationPasses::One),