From e317f901e71a4ecc20db82c2cf4d3ce9540ad1da Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 19 Oct 2024 11:17:25 -0400 Subject: [PATCH] clippy --- src/cst/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cst/mod.rs b/src/cst/mod.rs index 185e006..52a1f77 100644 --- a/src/cst/mod.rs +++ b/src/cst/mod.rs @@ -2457,10 +2457,8 @@ fn set_trailing_commas( let mut insert_index = element.child_index() + 1; parent.raw_insert_child(Some(&mut insert_index), CstToken::new(',').into()); } - } else { - if let Some(trailing_comma) = element.trailing_comma() { - trailing_comma.remove(); - } + } else if let Some(trailing_comma) = element.trailing_comma() { + trailing_comma.remove(); } }