From 653de5c919e85c101155a950aa939032e0f8f4e8 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 30 Jun 2023 16:11:21 +0200 Subject: [PATCH] Clippy tweaks to new build script --- gen_7_scripts/build.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/gen_7_scripts/build.rs b/gen_7_scripts/build.rs index 1d343c4..a2a7a61 100644 --- a/gen_7_scripts/build.rs +++ b/gen_7_scripts/build.rs @@ -110,17 +110,14 @@ fn write_scripts(path: &str, output_file: &mut std::fs::File) { }) .collect::>(); for script_impl in script_impls { - match script_impl.self_ty.as_ref() { - syn::Type::Path(p) => { - let ident = p.path.segments[0].ident.to_string(); - writeln!( - output_file, - " crate::{}::{}::{},", - path, file, ident - ) - .unwrap(); - } - _ => {} + if let syn::Type::Path(p) = script_impl.self_ty.as_ref() { + let ident = p.path.segments[0].ident.to_string(); + writeln!( + output_file, + " crate::{}::{}::{},", + path, file, ident + ) + .unwrap(); } } }