From e2327b5235d809da2c36f506e3eea54b5e10f087 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 14 Nov 2023 16:55:04 +0000 Subject: [PATCH] refactor!: remove Span.Replace for .NET 8 (#88) --- CHANGELOG.md | 1 + X10D/src/Collections/SpanExtensions.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 041acb6..00ce823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ TypeInitializationException. - X10D: Removed `IEnumerable.ConcatOne` - this functionality already exists with `Append`. - X10D: Removed `Endianness` enum. +- X10D: Removed `Span.Replace(T, T)` for .NET 8 target. - X10D: Removed .NET Standard 2.1 target. - X10D.Hosting: Removed .NET Standard 2.1 target. - X10D.DSharpPlus: Complete sunset of library. This library will not be updated to support DSharpPlus v5.0.0 (#83). diff --git a/X10D/src/Collections/SpanExtensions.cs b/X10D/src/Collections/SpanExtensions.cs index da54843..7c3ee0a 100644 --- a/X10D/src/Collections/SpanExtensions.cs +++ b/X10D/src/Collections/SpanExtensions.cs @@ -53,6 +53,7 @@ public static class SpanExtensions return source; } +#if !NET8_0_OR_GREATER /// /// Replaces all occurrences of a specified element in a span of elements with another specified element. /// @@ -72,6 +73,7 @@ public static class SpanExtensions } } } +#endif /// /// Splits a span of elements into sub-spans based on a delimiting element.