提交 2772d766 编写于 作者: G Ganbarukamo41 提交者: Jan Kotas

Implement IEquatable to Memory and ReadOnlyMemory (dotnet/coreclr#23586)



Commit migrated from https://github.com/dotnet/coreclr/commit/b23ad3afc2276945c5c5ab60ecda32d6e0c821a3
上级 ed2f225c
...@@ -20,7 +20,7 @@ namespace System ...@@ -20,7 +20,7 @@ namespace System
/// </summary> /// </summary>
[DebuggerTypeProxy(typeof(MemoryDebugView<>))] [DebuggerTypeProxy(typeof(MemoryDebugView<>))]
[DebuggerDisplay("{ToString(),raw}")] [DebuggerDisplay("{ToString(),raw}")]
public readonly struct Memory<T> public readonly struct Memory<T> : IEquatable<Memory<T>>
{ {
// NOTE: With the current implementation, Memory<T> and ReadOnlyMemory<T> must have the same layout, // NOTE: With the current implementation, Memory<T> and ReadOnlyMemory<T> must have the same layout,
// as code uses Unsafe.As to cast between them. // as code uses Unsafe.As to cast between them.
......
...@@ -20,7 +20,7 @@ namespace System ...@@ -20,7 +20,7 @@ namespace System
/// </summary> /// </summary>
[DebuggerTypeProxy(typeof(MemoryDebugView<>))] [DebuggerTypeProxy(typeof(MemoryDebugView<>))]
[DebuggerDisplay("{ToString(),raw}")] [DebuggerDisplay("{ToString(),raw}")]
public readonly struct ReadOnlyMemory<T> public readonly struct ReadOnlyMemory<T> : IEquatable<ReadOnlyMemory<T>>
{ {
// NOTE: With the current implementation, Memory<T> and ReadOnlyMemory<T> must have the same layout, // NOTE: With the current implementation, Memory<T> and ReadOnlyMemory<T> must have the same layout,
// as code uses Unsafe.As to cast between them. // as code uses Unsafe.As to cast between them.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册