Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WhiteSpaceChars: always check NET8_0 #225

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/Polyfill/Polyfill_Memory_SpanSplitEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,11 @@ public bool MoveNext()

const string whitespaces = "\t\n\v\f\r\u0020\u0085\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000";

#if NET8_0_OR_GREATER
#if NET8_0
public static readonly SearchValues<char> WhiteSpaceChars =
SearchValues.Create(whitespaces.AsSpan());
#else
public static readonly T[] WhiteSpaceChars;
#endif

#if !NET8_0

static SpanSplitEnumerator()
{
Expand All @@ -216,9 +213,8 @@ static SpanSplitEnumerator()
.ToArray();
}
}

#endif
}
}

#endif
#endif