Fix some clippy lints

This commit is contained in:
Laurențiu Nicola
2021-08-16 22:04:26 +03:00
parent 978b140781
commit c9f448a834
2 changed files with 3 additions and 3 deletions

View File

@@ -464,7 +464,7 @@ pub(crate) fn add_method_to_adt(
}
pub fn useless_type_special_case(field_name: &str, field_ty: &String) -> Option<(String, String)> {
if field_ty.to_string() == "String" {
if field_ty == "String" {
cov_mark::hit!(useless_type_special_case);
return Some(("&str".to_string(), format!("self.{}.as_str()", field_name)));
}