From 2772d7669ffdd991dc5b3cee5e0c9929aafbc960 Mon Sep 17 00:00:00 2001 From: Ganbarukamo41 Date: Sat, 30 Mar 2019 02:10:00 +0000 Subject: [PATCH] Implement IEquatable to Memory and ReadOnlyMemory (dotnet/coreclr#23586) Commit migrated from https://github.com/dotnet/coreclr/commit/b23ad3afc2276945c5c5ab60ecda32d6e0c821a3 --- src/libraries/System.Private.CoreLib/src/System/Memory.cs | 2 +- .../System.Private.CoreLib/src/System/ReadOnlyMemory.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Memory.cs b/src/libraries/System.Private.CoreLib/src/System/Memory.cs index 20744046304..d468a8ca247 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Memory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Memory.cs @@ -20,7 +20,7 @@ namespace System /// [DebuggerTypeProxy(typeof(MemoryDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] - public readonly struct Memory + public readonly struct Memory : IEquatable> { // NOTE: With the current implementation, Memory and ReadOnlyMemory must have the same layout, // as code uses Unsafe.As to cast between them. diff --git a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs index bf90f0449d0..be664e62325 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs @@ -20,7 +20,7 @@ namespace System /// [DebuggerTypeProxy(typeof(MemoryDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] - public readonly struct ReadOnlyMemory + public readonly struct ReadOnlyMemory : IEquatable> { // NOTE: With the current implementation, Memory and ReadOnlyMemory must have the same layout, // as code uses Unsafe.As to cast between them. -- GitLab