From 89dde840cea7ecd40e8a6ffb848540c702fdf6aa Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Tue, 20 Dec 2022 22:21:14 +0100 Subject: [PATCH 1/2] Fix nullability of "Rank" comparer arg --- MoreLinq.Test/RankTest.cs | 2 ++ MoreLinq/Rank.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MoreLinq.Test/RankTest.cs b/MoreLinq.Test/RankTest.cs index 1187e408e..5fd0a78db 100644 --- a/MoreLinq.Test/RankTest.cs +++ b/MoreLinq.Test/RankTest.cs @@ -15,6 +15,8 @@ // limitations under the License. #endregion +#nullable enable + namespace MoreLinq.Test { using System; diff --git a/MoreLinq/Rank.cs b/MoreLinq/Rank.cs index d2c81a382..4e5586382 100644 --- a/MoreLinq/Rank.cs +++ b/MoreLinq/Rank.cs @@ -43,7 +43,7 @@ public static IEnumerable Rank(this IEnumerable source) /// A object that defines comparison semantics for the elements in the sequence /// A sequence of position integers representing the ranks of the corresponding items in the sequence - public static IEnumerable Rank(this IEnumerable source, IComparer comparer) + public static IEnumerable Rank(this IEnumerable source, IComparer? comparer) { return source.RankBy(IdFn, comparer); } From 5782136f1f21f70c3c9a20bc07d3da18d0b7872a Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Tue, 20 Dec 2022 22:36:28 +0100 Subject: [PATCH 2/2] Refresh extension wrapper --- MoreLinq/Extensions.g.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoreLinq/Extensions.g.cs b/MoreLinq/Extensions.g.cs index 9e5b16a71..52ed15837 100644 --- a/MoreLinq/Extensions.g.cs +++ b/MoreLinq/Extensions.g.cs @@ -4634,7 +4634,7 @@ public static IEnumerable Rank(this IEnumerable source) /// A object that defines comparison semantics for the elements in the sequence /// A sequence of position integers representing the ranks of the corresponding items in the sequence - public static IEnumerable Rank(this IEnumerable source, IComparer comparer) + public static IEnumerable Rank(this IEnumerable source, IComparer? comparer) => MoreEnumerable.Rank(source, comparer); }