From c7c57f8a161f3ed2a561d237ec285de8cd8e7a96 Mon Sep 17 00:00:00 2001 From: David Bar-On Date: Wed, 17 Mar 2021 11:55:51 +0200 Subject: [PATCH] Fix issue with extra semicolon when import comment preceeds semicolon --- src/lists.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lists.rs b/src/lists.rs index a878e6cf9b2..41afef279e9 100644 --- a/src/lists.rs +++ b/src/lists.rs @@ -637,7 +637,7 @@ pub(crate) fn extract_post_comment( post_snippet.trim_matches(white_space) } // not comment or over two lines - else if post_snippet.ends_with(',') + else if post_snippet.ends_with(separator) && (!post_snippet.trim().starts_with("//") || post_snippet.trim().contains('\n')) { post_snippet[..(post_snippet.len() - 1)].trim_matches(white_space)