From 28284c25db9ee75922f9f3e679038a96ab758d79 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 14 Mar 2025 19:18:48 +0000 Subject: [PATCH] Remove redundant nullable annotation The nullable annotation on type constraint 'IEquatable?' is redundant because type parameter 'T' has 'struct' constraint. --- .../System.Private.CoreLib/src/System/SpanHelpers.T.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs index fb8e18ac2d16b8..a39cb59ba8d5af 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs @@ -3773,7 +3773,7 @@ public static int Count(ref T current, T value, int length) where T : IEquata return count; } - public static unsafe int CountValueType(ref T current, T value, int length) where T : struct, IEquatable? + public static unsafe int CountValueType(ref T current, T value, int length) where T : struct, IEquatable { int count = 0; ref T end = ref Unsafe.Add(ref current, length);