@ -58,7 +58,7 @@ impl FromStr for BaseHashFunction {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Error> {
let s = s.to_lowercase().replace("-", "").replace("_", "");
let s = s.to_lowercase().replace('-', "").replace('_', "");
match s.as_str() {
"sha256" => Ok(BaseHashFunction::Sha256),
"sha384" => Ok(BaseHashFunction::Sha384),
@ -71,7 +71,7 @@ impl FromStr for KeyType {
match s.to_lowercase().replace("-", "_").as_str() {
match s.to_lowercase().replace('-', "_").as_str() {
"rsa2048" => Ok(KeyType::Rsa2048),
"rsa4096" => Ok(KeyType::Rsa4096),
"ecdsa_p256" => Ok(KeyType::EcdsaP256),
@ -269,8 +269,8 @@ impl KeyPair {
x += &pem_line
.trim()
.trim_end_matches('=')
.replace("/", "_")
.replace("+", "-");
.replace('/', "_")
.replace('+', "-");
}
x.replace_range(..16, "");
@ -483,7 +483,7 @@ impl Certificate {
id.to_string()
};
let name = name.replace("*", "_").replace(":", "_").replace("/", "_");
let name = name.replace('*', "_").replace(':', "_").replace('/', "_");
Ok(name)