should flix clippy and rust fmt
@@ -68,7 +68,11 @@ enum NameErrors {
impl Display for NameErrors {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
- Self::CargoReserved(name) => write!(f, "The project name cannot be `{}` due to cargo's reserved keywords", name),
+ Self::CargoReserved(name) => write!(
+ f,
+ "The project name cannot be `{}` due to cargo's reserved keywords",
+ name
+ ),
Self::Hyphen => write!(f, "The project name cannot contain `-`"),
}
}
@@ -85,7 +89,7 @@ fn check_name(name: &str) -> Result<&str, NameErrors> {
if RESERVED_NAMES.contains(&name) {
return Err(NameErrors::CargoReserved(name.to_string()));
}
- if name.contains("-") {
+ if name.contains('-') {
return Err(NameErrors::Hyphen);
}
Ok(name)
