Skip to content

Commit

Permalink
remove redundant tolist method invocation
Browse files Browse the repository at this point in the history
ToList method invocation is redundant.
  • Loading branch information
testfirstcoder authored and BEagle1984 committed Mar 5, 2024
1 parent d052f1b commit 2a9b801
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Silverback.Core/Util/EnumerableSortExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public static IEnumerable<T> SortBySortIndex<T>(this IEnumerable<T> items)

return sortables.Where(sorted => sorted.SortIndex <= 0).Cast<T>()
.Union(notSortables)
.Union(sortables.Where(b => b.SortIndex > 0).Cast<T>())
.ToList();
.Union(sortables.Where(b => b.SortIndex > 0).Cast<T>());
}
}
}

0 comments on commit 2a9b801

Please sign in to comment.