Skip to content

Commit

Permalink
Use ToImmutableArray
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed May 3, 2022
1 parent 7e4c15f commit abe8628
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ private static INamedTypeSymbol CollidingDeclaration(INamedTypeSymbol declaredTy

private static bool CanInterfaceBeRemovedBasedOnMembers(INamedTypeSymbol declaredType, INamedTypeSymbol interfaceType)
{
var allMembersOfInterface = AllInterfacesAndSelf(interfaceType)
.SelectMany(x => x.GetMembers())
.ToList();
var allMembersOfInterface = AllInterfacesAndSelf(interfaceType).SelectMany(x => x.GetMembers()).ToImmutableArray();

if (!allMembersOfInterface.Any())
{
Expand Down

0 comments on commit abe8628

Please sign in to comment.