We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82ce59a commit 15a8d86Copy full SHA for 15a8d86
src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs
@@ -4990,11 +4990,8 @@ private static void SliceLongerSpanToMatchShorterLength<T>(ref ReadOnlySpan<T> s
4990
{
4991
other = other.Slice(0, span.Length);
4992
}
4993
- else if (span.Length > other.Length)
4994
- {
4995
- span = span.Slice(0, other.Length);
4996
- }
4997
- Debug.Assert(span.Length == other.Length);
+
+ span = span.Slice(0, other.Length);
4998
4999
5000
/// <summary>
0 commit comments