Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Mar 4, 2024
1 parent a96c4e5 commit 06478cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion new-cli/GitVersion.Cli.Generator/CommandImplGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
visitor.Visit(compilation.GlobalNamespace);
var selectCommandTypes = visitor.GetResults();

return selectCommandTypes.Select(selectCommandType => MapToCommandInfo(selectCommandType, ct)).ToImmutableArray();
return [.. selectCommandTypes.Select(selectCommandType => MapToCommandInfo(selectCommandType, ct))];

static bool SearchQuery(INamedTypeSymbol typeSymbol)
{
Expand Down
2 changes: 1 addition & 1 deletion new-cli/GitVersion.Cli.Generator/TypeVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class TypeVisitor(Func<INamedTypeSymbol, bool> searchQuery, Cancellatio
{
private readonly HashSet<INamedTypeSymbol> _exportedTypes = new(SymbolEqualityComparer.Default);

public ImmutableArray<INamedTypeSymbol> GetResults() => this._exportedTypes.ToImmutableArray();
public ImmutableArray<INamedTypeSymbol> GetResults() => [.. this._exportedTypes];

public override void VisitAssembly(IAssemblySymbol symbol)
{
Expand Down

0 comments on commit 06478cd

Please sign in to comment.