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
+1 -1
View File
@@ -60,7 +60,7 @@ impl Attributes {
.iter() .iter()
.filter_map(|avp| { .filter_map(|avp| {
if avp.typ == typ { if avp.typ == typ {
Some(avp); return Some(avp);
} }
None None
}) })
+1 -5
View File
@@ -121,11 +121,7 @@ fn generate_values_code(
} }
} }
fn generate_values_for_attribute_code( fn generate_values_for_attribute_code(w: &mut BufWriter<File>, attr: &str, values: &[RadiusValue]) {
w: &mut BufWriter<File>,
attr: &String,
values: &[RadiusValue],
) {
let type_name = attr.to_pascal_case(); let type_name = attr.to_pascal_case();
w.write_all( w.write_all(
format!( format!(