-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Simplify collections, and produce less pooling work #79153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/Dependencies/Collections/Extensions/IEnumerableExtensions.cs
Outdated
Show resolved
Hide resolved
src/Dependencies/Collections/Extensions/ImmutableArrayExtensions.cs
Outdated
Show resolved
Hide resolved
src/Dependencies/Collections/Extensions/ImmutableArrayExtensions.cs
Outdated
Show resolved
Hide resolved
src/Dependencies/Collections/Extensions/ImmutableArrayExtensions.cs
Outdated
Show resolved
Hide resolved
@@ -69,7 +69,7 @@ public static ImmutableArray<T> ToImmutableArrayOrEmpty<T>(this IEnumerable<T>? | |||
{ | |||
if (items == null) | |||
{ | |||
return ImmutableArray.Create<T>(); | |||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I don't normally mind the change, if this is a source package does this create a problem for any of our consumers that aren't on a new enough compiler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collection expressions were C# 12. we're already about to ship 14. I would expect at most we would want people on N-1. Not arbitrarily far back.
No description provided.