diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs | 4 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/MemoryExtensions.cs | 28 |
2 files changed, 2 insertions, 30 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs index fd64c6d11..bf86e0cfd 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/DateTimeParse.cs @@ -5296,7 +5296,7 @@ new DS[] { DS.ERROR, DS.TX_NNN, DS.TX_NNN, DS.TX_NNN, DS.ERROR, DS.ERROR, Span<char> result = new char[i + 1]; result[i] = ch; Value.Slice(0, i).CopyTo(result); - Value = result.AsReadOnlySpan(); + Value = result; } } } @@ -5323,7 +5323,7 @@ new DS[] { DS.ERROR, DS.TX_NNN, DS.TX_NNN, DS.TX_NNN, DS.ERROR, DS.ERROR, Span<char> result = new char[Value.Length - i]; result[0] = ch; Value.Slice(i + 1).CopyTo(result.Slice(1)); - Value = result.AsReadOnlySpan(); + Value = result; } } } diff --git a/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs b/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs index d5a6b72eb..0f8f167e6 100644 --- a/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs +++ b/src/System.Private.CoreLib/shared/System/MemoryExtensions.cs @@ -786,34 +786,6 @@ namespace System } /// <summary> - /// Creates a new readonly span over the entire target array. - /// </summary> - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ReadOnlySpan<T> AsReadOnlySpan<T>(this T[] array) - { - return new ReadOnlySpan<T>(array); - } - - /// <summary> - /// Creates a new readonly span over the entire target span. - /// </summary> - public static ReadOnlySpan<T> AsReadOnlySpan<T>(this Span<T> span) => span; - - /// <summary> - /// Creates a new readonly span over the target array segment. - /// </summary> - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ArraySegment<T> arraySegment) - { - return new ReadOnlySpan<T>(arraySegment.Array, arraySegment.Offset, arraySegment.Count); - } - - /// <summary> - /// Creates a new readonly memory over the entire target memory. - /// </summary> - public static ReadOnlyMemory<T> AsReadOnlyMemory<T>(this Memory<T> memory) => memory; - - /// <summary> /// Creates a new memory over the target array. /// </summary> public static Memory<T> AsMemory<T>(this T[] array) => new Memory<T>(array); |