Fix clippy warnings

This commit is contained in:
moznion
2020-11-28 17:37:43 +09:00
parent a4044c29e2
commit a529b5f0a6
2 changed files with 2 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ impl Attributes {
.iter()
.filter_map(|avp| {
if avp.typ == typ {
Some(avp);
return Some(avp);
}
None
})

View File

@@ -121,11 +121,7 @@ fn generate_values_code(
}
}
fn generate_values_for_attribute_code(
w: &mut BufWriter<File>,
attr: &String,
values: &[RadiusValue],
) {
fn generate_values_for_attribute_code(w: &mut BufWriter<File>, attr: &str, values: &[RadiusValue]) {
let type_name = attr.to_pascal_case();
w.write_all(
format!(