Replace CollectionsMarshal.AsSpan with IList<T> indexing in ToFastArray - #664
Conversation
|
Thanks @LeaFrock. The change itself is right and I've verified the edge case I was most worried about: a I pushed a merge commit to this branch — here's why. The PR was showing 2712 changed lines in That wasn't your doing. The repo had no So I fixed the cause on Then I merged that Result: the diff went from +1408/-1444 to +54/-90, and Verified locally after the merge: clean build on all TFMs with One observation while I was in there, unrelated to this PR: Ready to merge from my side. It ships with v13.5. |
|
Merging. Thanks @LeaFrock — this ships in v13.5. |
Motivation
Closes #660.
Changes
CollectionsMarshal.AsSpanwithIList<T>indexing inToFastArray(ICollection<TSource>? source)SpanExtensions.ToFastArray(ReadOnlySpan<TSource> source)toGenericsExtensionsGenericsExtensions.ToFastArray(T[]? source)when the ROS overload is enoughGenericsExtensionsfromHelperstoExtensionsfolder & namespaceChecklist
TreatWarningsAsErrorsis enabled)dotnet test)