diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs b/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs index 656b864e2..2aec70409 100644 --- a/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs +++ b/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -#if !netstandard using Internal.Runtime.CompilerServices; -#endif namespace System { @@ -26,7 +24,7 @@ namespace System } public static int BinarySearch<T, TComparable>( - ref T spanStart, int length, TComparable comparable) + ref T spanStart, int length, TComparable comparable) where TComparable : IComparable<T> { int lo = 0; @@ -64,11 +62,11 @@ namespace System } // Helper to allow sharing all code via IComparable<T> inlineable - internal struct ComparerComparable<T, TComparer> : IComparable<T> + internal readonly struct ComparerComparable<T, TComparer> : IComparable<T> where TComparer : IComparer<T> { - readonly T _value; - readonly TComparer _comparer; + private readonly T _value; + private readonly TComparer _comparer; public ComparerComparable(T value, TComparer comparer) { |