Sfoglia il codice sorgente

Usings must be distinct

Piotr Czajkowski 1 anno fa
parent
commit
0670faf068
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      CodeGenerators/CodeGenerators/ClassRecordGenerator.cs

+ 1 - 1
CodeGenerators/CodeGenerators/ClassRecordGenerator.cs

@@ -22,7 +22,7 @@ public class ClassRecordGenerator : IGenerator
         var sb = new StringBuilder();
         if (Usings.Any())
         {
-            foreach (var usingItem in Usings)
+            foreach (var usingItem in Usings.Distinct())
                 sb.AppendLine($"using {usingItem};");
 
             sb.AppendLine();