From 63d4efe4f3283661b4866c61bb6bd2664a5c63bd Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 15 Jan 2023 13:13:09 +0100 Subject: [PATCH] Mark local function static where possible --- MoreLinq.Test/MemoizeTest.cs | 2 +- MoreLinq.Test/TraceTest.cs | 2 +- MoreLinq/ToDataTable.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MoreLinq.Test/MemoizeTest.cs b/MoreLinq.Test/MemoizeTest.cs index d600afc68..d6e12f5d1 100644 --- a/MoreLinq.Test/MemoizeTest.cs +++ b/MoreLinq.Test/MemoizeTest.cs @@ -43,7 +43,7 @@ public void MemoizeReturningExpectedElementsWhenUsedAtInnerForEach() flowArray.AssertSequenceEqual(flowBuffer); - IEnumerable InnerForEach(IEnumerable source) + static IEnumerable InnerForEach(IEnumerable source) { var firstVisitAtInnerLoopDone = false; diff --git a/MoreLinq.Test/TraceTest.cs b/MoreLinq.Test/TraceTest.cs index 65dc4f2b3..5c9725a35 100644 --- a/MoreLinq.Test/TraceTest.cs +++ b/MoreLinq.Test/TraceTest.cs @@ -82,7 +82,7 @@ static IEnumerable Lines(string str) while (e.MoveNext()) yield return e.Current; - IEnumerator _(TextReader reader) + static IEnumerator _(TextReader reader) { while (reader.ReadLine() is { } line) yield return line; diff --git a/MoreLinq/ToDataTable.cs b/MoreLinq/ToDataTable.cs index 793eb6bc5..2342ae0f1 100644 --- a/MoreLinq/ToDataTable.cs +++ b/MoreLinq/ToDataTable.cs @@ -159,7 +159,7 @@ static IEnumerable PrepareMemberInfos(ICollection